Replace reset icon

This commit is contained in:
Victor Shcherb 2013-07-01 00:27:02 +02:00
parent 3d76386397
commit 8884f73090
14 changed files with 16 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -6,7 +6,7 @@
<TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="wrap_content" <TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="20sp" /> android:layout_height="wrap_content" android:textSize="20sp" />
<ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="@drawable/reset" <ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="?attr/reset_image"
android:contentDescription="@string/default_buttons_delete" android:contentDescription="@string/default_buttons_delete"
android:paddingLeft="2dp" android:paddingRight="2dp" android:paddingLeft="2dp" android:paddingRight="2dp"
android:paddingTop="2dp" android:layout_height="wrap_content" /> android:paddingTop="2dp" android:layout_height="wrap_content" />

View file

@ -14,28 +14,32 @@
<TextView android:id="@+id/TextView" android:text="@string/search_address_region"> <TextView android:id="@+id/TextView" android:text="@string/search_address_region">
</TextView> </TextView>
<Button android:id="@+id/CountryButton" android:text="@string/ChooseCountry" /> <Button android:id="@+id/CountryButton" android:text="@string/ChooseCountry" />
<ImageButton android:id="@+id/ResetCountry" android:layout_marginRight = "5dp" android:background="@drawable/reset" android:contentDescription="@string/default_buttons_reset"> <ImageButton android:id="@+id/ResetCountry" android:layout_marginRight = "5dp" android:layout_gravity="center_vertical"
android:background="?attr/reset_image" android:contentDescription="@string/default_buttons_reset">
</ImageButton> </ImageButton>
</TableRow> </TableRow>
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" > <TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
<TextView android:id="@+id/TextView" android:text="@string/search_address_city"> <TextView android:id="@+id/TextView" android:text="@string/search_address_city">
</TextView> </TextView>
<Button android:id="@+id/CityButton" android:text="@string/choose_city" /> <Button android:id="@+id/CityButton" android:text="@string/choose_city" />
<ImageButton android:id="@+id/ResetCity" android:layout_marginRight = "5dp" android:background="@drawable/reset" android:contentDescription="@string/default_buttons_reset"> <ImageButton android:id="@+id/ResetCity" android:layout_marginRight = "5dp" android:layout_gravity="center_vertical"
android:background="?attr/reset_image" android:contentDescription="@string/default_buttons_reset">
</ImageButton> </ImageButton>
</TableRow> </TableRow>
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp"> <TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
<TextView android:id="@+id/TextView" android:text="@string/search_address_street"> <TextView android:id="@+id/TextView" android:text="@string/search_address_street">
</TextView> </TextView>
<Button android:id="@+id/StreetButton" android:text="@string/choose_street" /> <Button android:id="@+id/StreetButton" android:text="@string/choose_street" />
<ImageButton android:id="@+id/ResetStreet" android:layout_marginRight = "5dp" android:background="@drawable/reset" android:contentDescription="@string/default_buttons_reset"> <ImageButton android:id="@+id/ResetStreet" android:layout_marginRight = "5dp" android:layout_gravity="center_vertical"
android:background="?attr/reset_image" android:contentDescription="@string/default_buttons_reset">
</ImageButton> </ImageButton>
</TableRow> </TableRow>
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp"> <TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
<TextView android:id="@+id/BuildingText" android:text="@string/search_address_building"> <TextView android:id="@+id/BuildingText" android:text="@string/search_address_building">
</TextView> </TextView>
<Button android:id="@+id/BuildingButton" android:text="@string/choose_building" /> <Button android:id="@+id/BuildingButton" android:text="@string/choose_building" />
<ImageButton android:id="@+id/ResetBuilding" android:layout_marginRight = "5dp" android:background="@drawable/reset" android:contentDescription="@string/default_buttons_reset"> <ImageButton android:id="@+id/ResetBuilding" android:layout_marginRight = "5dp" android:layout_gravity="center_vertical"
android:background="?attr/reset_image" android:contentDescription="@string/default_buttons_reset">
</ImageButton> </ImageButton>
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View file

@ -18,7 +18,7 @@
android:contentDescription="@string/default_buttons_delete" android:contentDescription="@string/default_buttons_delete"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/reset" android:background="?attr/reset_image"
android:paddingLeft="2dp" android:paddingLeft="2dp"
android:paddingRight="2dp" android:paddingRight="2dp"
android:paddingTop="2dp" /> android:paddingTop="2dp" />

View file

@ -9,7 +9,7 @@
<TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="wrap_content" <TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="20sp" /> android:layout_height="wrap_content" android:textSize="20sp" />
<ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="@drawable/reset" <ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="?attr/reset_image"
android:contentDescription="@string/default_buttons_delete" android:contentDescription="@string/default_buttons_delete"
android:paddingLeft="2dp" android:paddingRight="2dp" android:paddingLeft="2dp" android:paddingRight="2dp"
android:paddingTop="2dp" android:layout_height="wrap_content" /> android:paddingTop="2dp" android:layout_height="wrap_content" />

View file

@ -5,5 +5,6 @@
</declare-styleable> </declare-styleable>
<declare-styleable name="OsmAndTheme"> <declare-styleable name="OsmAndTheme">
<attr name="expandable_category_color" format="reference"/> <attr name="expandable_category_color" format="reference"/>
<attr name="reset_image" format="reference"/>
</declare-styleable> </declare-styleable>
</resources> </resources>

View file

@ -23,6 +23,7 @@
<style name="OsmandLightTheme" parent="Theme.Sherlock.Light"> <style name="OsmandLightTheme" parent="Theme.Sherlock.Light">
<item name="expandable_category_color">@color/group_background</item> <item name="expandable_category_color">@color/group_background</item>
<item name="reset_image">@drawable/ic_action_delete_light</item> <!-- @drawable/a_1_navigation_cancel_light -->
</style> </style>
<style name="OsmandLightDarkActionBarTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <style name="OsmandLightDarkActionBarTheme" parent="Theme.Sherlock.Light.DarkActionBar">
<!--<item name="android:windowContentOverlay">@null</item> <!--<item name="android:windowContentOverlay">@null</item>
@ -35,11 +36,13 @@
<item name="android:textColorTertiary">@color/activity_text</item> <item name="android:textColorTertiary">@color/activity_text</item>
<item name="android:listViewStyle">@style/OsmandListView</item> <item name="android:listViewStyle">@style/OsmandListView</item>
--> -->
<item name="reset_image">@drawable/ic_action_delete_light</item> <!-- @drawable/a_1_navigation_cancel_light -->
<item name="expandable_category_color">@color/group_background</item> <item name="expandable_category_color">@color/group_background</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item> <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style> </style>
<style name="OsmandDarkTheme" parent="Theme.Sherlock"> <style name="OsmandDarkTheme" parent="Theme.Sherlock">
<item name="reset_image">@drawable/ic_action_delete_dark</item> <!-- @drawable/a_1_navigation_cancel_dark -->
<item name="expandable_category_color">?android:attr/colorBackground</item> <item name="expandable_category_color">?android:attr/colorBackground</item>
</style> </style>

View file

@ -68,9 +68,7 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear
clearButton.setVisibility(View.GONE); clearButton.setVisibility(View.GONE);
} }
}); });
if (!historyAdapter.isEmpty()) { getListView().addFooterView(clearButton);
getListView().addFooterView(clearButton);
}
} }
@Override @Override