From 61e08f88488cc5b1c2aae6d54b857dab436e3ea1 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 2 Aug 2010 20:59:28 +0000 Subject: [PATCH] fix layout for large/small screens and high density devices... git-svn-id: https://osmand.googlecode.com/svn/trunk@428 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- .../osmand/data/index/IndexBatchCreator.java | 12 +++---- OsmAnd/res/layout-land/navigate_point.xml | 22 +++++++------ OsmAnd/res/layout/editing_poi_filter_list.xml | 4 +-- OsmAnd/res/layout/favourites.xml | 10 ------ OsmAnd/res/layout/favourites_list_item.xml | 12 +++---- OsmAnd/res/layout/list_textview.xml | 2 +- OsmAnd/res/layout/navigate_point.xml | 31 ++++++++++--------- OsmAnd/res/layout/open_bug.xml | 6 ++-- OsmAnd/res/layout/open_hours_list_item.xml | 6 ++-- .../search_address_online_list_item.xml | 4 +-- .../osmand/activities/EditingPOIActivity.java | 1 - .../osmand/activities/FavouritesActivity.java | 5 +-- 12 files changed, 54 insertions(+), 61 deletions(-) delete mode 100644 OsmAnd/res/layout/favourites.xml diff --git a/DataExtractionOSM/src/com/osmand/data/index/IndexBatchCreator.java b/DataExtractionOSM/src/com/osmand/data/index/IndexBatchCreator.java index 08cc0ecd01..781a869503 100644 --- a/DataExtractionOSM/src/com/osmand/data/index/IndexBatchCreator.java +++ b/DataExtractionOSM/src/com/osmand/data/index/IndexBatchCreator.java @@ -125,12 +125,12 @@ public class IndexBatchCreator { // TODO Japan protected static final String[] asia = new String[] { - "Afghanistan", "Bahrain", "Bangladesh", "Bhutan", "British_Indian_Ocean_Territory", "Brunei", "Cambodia", - "China", "Christmas_Island", "Democratic_Republic_of_Timor-Leste", "Gaza_Strip", "India", "Indonesia", "Iran", - "Iraq", "Israel", "Jordan", "Kazakhstan", "Kuwait", "Kyrgyzstan", "Laos", "Lebanon", "Macau", "Malaysia", - "Maldives", "Mongolia", "Nepal", "North_Korea", "Oman", "Pakistan", "Paracel_Islands", "Philippines", "Qatar", - "Saudi_Arabia", "Singapore", "South_Korea", "Spratly_Islands", "Sri_Lanka", "Syria", "Taiwan", "Tajikistan", -// "Thailand", "Turkey", "Turkmenistan", "Union_of_Myanmar", "United_Arab_Emirates", "Uzbekistan", "Vietnam", "Yemen", +// "Afghanistan", "Bahrain", "Bangladesh", "Bhutan", "British_Indian_Ocean_Territory", "Brunei", "Cambodia", +// "China", "Christmas_Island", "Democratic_Republic_of_Timor-Leste", "Gaza_Strip", "India", "Indonesia", "Iran", +// "Iraq", "Israel", "Jordan", "Kazakhstan", "Kuwait", "Kyrgyzstan", "Laos", "Lebanon", "Macau", "Malaysia", +// "Maldives", "Mongolia", "Nepal", "North_Korea", "Oman", "Pakistan", "Paracel_Islands", "Philippines", "Qatar", +// "Saudi_Arabia", "Singapore", "South_Korea", "Spratly_Islands", "Sri_Lanka", "Syria", "Taiwan", "Tajikistan", +// "Thailand", "Turkmenistan", "Union_of_Myanmar", "United_Arab_Emirates", "Uzbekistan", "Vietnam", "Yemen", }; diff --git a/OsmAnd/res/layout-land/navigate_point.xml b/OsmAnd/res/layout-land/navigate_point.xml index 8a95d903d3..1365551234 100644 --- a/OsmAnd/res/layout-land/navigate_point.xml +++ b/OsmAnd/res/layout-land/navigate_point.xml @@ -4,16 +4,18 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> - - - - - + - - - - + + + + + + + + + + @@ -21,7 +23,7 @@ - + diff --git a/OsmAnd/res/layout/editing_poi_filter_list.xml b/OsmAnd/res/layout/editing_poi_filter_list.xml index 4fef32fa4c..08119b4fdd 100644 --- a/OsmAnd/res/layout/editing_poi_filter_list.xml +++ b/OsmAnd/res/layout/editing_poi_filter_list.xml @@ -6,10 +6,10 @@ + android:textSize="25sp"> + android:textSize="25sp"> \ No newline at end of file diff --git a/OsmAnd/res/layout/favourites.xml b/OsmAnd/res/layout/favourites.xml deleted file mode 100644 index a58a456e81..0000000000 --- a/OsmAnd/res/layout/favourites.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/favourites_list_item.xml b/OsmAnd/res/layout/favourites_list_item.xml index a1befa3489..cf05b2af80 100644 --- a/OsmAnd/res/layout/favourites_list_item.xml +++ b/OsmAnd/res/layout/favourites_list_item.xml @@ -3,14 +3,14 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> - + - + android:textSize="23sp" android:maxWidth="150dp" android:minWidth="100dp"/> + \ No newline at end of file diff --git a/OsmAnd/res/layout/list_textview.xml b/OsmAnd/res/layout/list_textview.xml index 8c41dbaf3d..fb11d5fd3c 100644 --- a/OsmAnd/res/layout/list_textview.xml +++ b/OsmAnd/res/layout/list_textview.xml @@ -2,5 +2,5 @@ + android:layout_height="wrap_content" android:textSize="20sp" android:textStyle="bold"> diff --git a/OsmAnd/res/layout/navigate_point.xml b/OsmAnd/res/layout/navigate_point.xml index 122a4e53b6..312f366098 100644 --- a/OsmAnd/res/layout/navigate_point.xml +++ b/OsmAnd/res/layout/navigate_point.xml @@ -4,17 +4,18 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> - - - - - + - - - - - + + + + + + + + + + @@ -23,11 +24,11 @@ - + - + - - + + diff --git a/OsmAnd/res/layout/open_bug.xml b/OsmAnd/res/layout/open_bug.xml index 345e81b226..8e3aae8fc0 100644 --- a/OsmAnd/res/layout/open_bug.xml +++ b/OsmAnd/res/layout/open_bug.xml @@ -2,18 +2,18 @@ + android:layout_height="fill_parent" android:stretchColumns="1"> + android:layout_height="wrap_content" > + android:layout_height="wrap_content" android:text="NoName"> diff --git a/OsmAnd/res/layout/open_hours_list_item.xml b/OsmAnd/res/layout/open_hours_list_item.xml index a015460c7a..d1a4c1040f 100644 --- a/OsmAnd/res/layout/open_hours_list_item.xml +++ b/OsmAnd/res/layout/open_hours_list_item.xml @@ -4,10 +4,10 @@ android:orientation="horizontal"> + android:layout_height="wrap_content" android:textSize="20sp" /> + android:paddingLeft="2dp" android:paddingRight="2dp" + android:paddingTop="2dp" android:layout_height="wrap_content" /> \ No newline at end of file diff --git a/OsmAnd/res/layout/search_address_online_list_item.xml b/OsmAnd/res/layout/search_address_online_list_item.xml index 36a13a9494..692b32550c 100644 --- a/OsmAnd/res/layout/search_address_online_list_item.xml +++ b/OsmAnd/res/layout/search_address_online_list_item.xml @@ -5,7 +5,7 @@ android:layout_height="fill_parent" android:orientation="horizontal"> + android:textSize="20sp"/> + android:layout_height="wrap_content" android:textSize="20sp" /> diff --git a/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java b/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java index 8f61db5374..c188dca76e 100644 --- a/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java +++ b/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java @@ -270,7 +270,6 @@ public class EditingPOIActivity { subCategories.add(s); } } - ArrayAdapter adapter = new ArrayAdapter(ctx, R.layout.list_textview, subCategories.toArray()); typeText.setAdapter(adapter); } diff --git a/OsmAnd/src/com/osmand/activities/FavouritesActivity.java b/OsmAnd/src/com/osmand/activities/FavouritesActivity.java index 553e2f177e..faaa06c7c6 100644 --- a/OsmAnd/src/com/osmand/activities/FavouritesActivity.java +++ b/OsmAnd/src/com/osmand/activities/FavouritesActivity.java @@ -67,12 +67,13 @@ public class FavouritesActivity extends ListActivity { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); - setContentView(R.layout.favourites); + ListView lv = new ListView(this); + lv.setId(android.R.id.list); + setContentView(lv); helper = new FavouritesDbHelper(this); favouritesList = helper.getFavouritePoints(); - ListView lv = getListView(); favouritesAdapter = new FavouritesAdapter(favouritesList); lv.setAdapter(favouritesAdapter); /* Add Context-Menu listener to the ListView. */