Overview profile redesign

This commit is contained in:
AdrianLxM 2016-11-10 23:17:28 +01:00
parent 4ee87d1cca
commit 7b4b4f7cfc
3 changed files with 18 additions and 3 deletions

View file

@ -411,6 +411,7 @@ public class OverviewFragment extends Fragment {
if (Config.APS) { if (Config.APS) {
apsModeView.setVisibility(View.VISIBLE); apsModeView.setVisibility(View.VISIBLE);
apsModeView.setBackgroundResource(R.drawable.loopmodeborder); apsModeView.setBackgroundResource(R.drawable.loopmodeborder);
apsModeView.setTextColor(Color.BLACK);
final LoopPlugin activeloop = MainApp.getConfigBuilder().getActiveLoop(); final LoopPlugin activeloop = MainApp.getConfigBuilder().getActiveLoop();
if(activeloop != null && activeloop.isEnabled(activeloop.getType())) { if(activeloop != null && activeloop.isEnabled(activeloop.getType())) {
if (MainApp.getConfigBuilder().isClosedModeEnabled()) { if (MainApp.getConfigBuilder().isClosedModeEnabled()) {
@ -421,6 +422,8 @@ public class OverviewFragment extends Fragment {
} else { } else {
apsModeView.setBackgroundResource(R.drawable.loopmodedisabledborder); apsModeView.setBackgroundResource(R.drawable.loopmodedisabledborder);
apsModeView.setText(MainApp.sResources.getString(R.string.disabledloop)); apsModeView.setText(MainApp.sResources.getString(R.string.disabledloop));
apsModeView.setTextColor(Color.WHITE);
} }

View file

@ -0,0 +1,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<stroke android:width="1dip" android:color="@android:color/white"/>
<corners
android:radius="2dp" >
</corners>
</shape>

View file

@ -79,11 +79,12 @@
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/overview_basebasal" android:id="@+id/overview_basebasal"
android:layout_weight="0.5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
@ -92,9 +93,14 @@
android:id="@+id/overview_activeprofile" android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_weight="0.5"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_marginRight="10dp"
android:textColor="@color/colorProfileSwitchButton" android:textColor="@color/colorProfileSwitchButton"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:gravity="center_vertical|center_horizontal"
android:background="@drawable/pillborder"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>