Fixes to osmo activity style

This commit is contained in:
Denis 2015-02-04 12:56:06 +02:00
parent f2c51d2f60
commit bbe400b6f6
4 changed files with 22 additions and 15 deletions

View file

@ -37,4 +37,5 @@
<string name="app_edition"></string>
<string name="preferred_locale_no_translate">Display language</string>
<string name="system_locale_no_translate">Device language</string>
<string name="osmo">OsMo</string>
</resources>

View file

@ -66,6 +66,7 @@
android:id="@+id/group_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:src="@drawable/ic_small_group"/>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?attr/expandable_category_color"
@ -22,26 +23,25 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="?android:textColorPrimary"
android:layout_marginLeft="8dp"
android:maxLines="1"
tools:text="@string/lorem_ipsum"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:textSize="18sp" />
<include layout="@layout/check_item_rel" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical">
<ImageView
android:id="@+id/settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="1dp"
android:focusable="false"
android:src="@drawable/ic_action_settings_dark" />
</RelativeLayout>
<ImageView
android:id="@+id/settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_marginRight="1dp"
android:focusable="false"/>
</LinearLayout>

View file

@ -139,7 +139,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
}
}
setContentView(R.layout.osmo_group_list);
getSupportActionBar().setTitle(R.string.osmo_activity);
getSupportActionBar().setTitle(R.string.osmo);
setSupportProgressBarIndeterminateVisibility(false);
setupHeader();
setupFooter();
@ -1152,10 +1152,15 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
} else {
label.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
}
View v = row.findViewById(R.id.settings);
ImageView v = (ImageView) row.findViewById(R.id.settings);
if(model.isMainGroup()) {
v.setVisibility(View.GONE);
} else {
if (getMyApplication().getSettings().isLightContent()){
v.setImageResource(R.drawable.ic_action_settings_light);
} else {
v.setImageResource(R.drawable.ic_action_settings_dark);
}
v.setVisibility(View.VISIBLE);
v.setOnClickListener(new View.OnClickListener() {