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
This commit is contained in:
Victor Shcherb 2010-08-02 20:59:28 +00:00
parent 6ab7d87b5d
commit 61e08f8848
12 changed files with 54 additions and 61 deletions

View file

@ -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",
};

View file

@ -4,16 +4,18 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</LinearLayout>
<TextView android:textSize="16sp" android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_longitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</LinearLayout>
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow android:layout_width="fill_parent" >
<TextView android:textSize="20sp" android:id="@+id/TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</TableRow>
<TableRow android:layout_width="fill_parent" >
<TextView android:textSize="20sp" android:id="@+id/TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_longitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</TableRow>
</TableLayout>
<RadioGroup android:id="@+id/RadioGroup" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" >
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format1" android:text="@string/navigate_point_format_D"></RadioButton>
@ -21,7 +23,7 @@
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format3" android:text="@string/navigate_point_format_DMS"></RadioButton>
</RadioGroup>
<TextView android:id="@+id/ValidateTextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
<TextView android:id="@+id/ValidateTextView" android:textSize="16sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
android:gravity="bottom|center">

View file

@ -6,10 +6,10 @@
<CheckBox android:id="@+id/filter_poi_check"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="25px"></CheckBox>
android:textSize="25sp"></CheckBox>
<TextView android:id="@+id/filter_poi_label"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textSize="25px"></TextView>
android:textSize="25sp"></TextView>
</LinearLayout>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is at /res/layout/list.xml -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@android:id/list" android:layout_width="fill_parent"
android:layout_height="fill_parent"></ListView>
</LinearLayout>

View file

@ -3,14 +3,14 @@
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/favourite_icon" android:layout_width="25px"
android:paddingLeft="2px" android:paddingRight="2px"
android:paddingTop="2px" android:layout_height="fill_parent" />
<ImageView android:id="@+id/favourite_icon" android:layout_width="25dp"
android:paddingLeft="2dp" android:paddingRight="2dp"
android:paddingTop="2dp" android:layout_height="fill_parent" />
<TextView android:id="@+id/favouritedistance_label"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center"
android:textSize="25px" android:maxWidth="150px" android:minWidth="100px"/>
<TextView android:id="@+id/favourite_label" android:layout_width="wrap_content" android:layout_marginLeft="10px"
android:layout_height="wrap_content" android:textSize="25px" />
android:textSize="23sp" android:maxWidth="150dp" android:minWidth="100dp"/>
<TextView android:id="@+id/favourite_label" android:layout_width="wrap_content" android:layout_marginLeft="10dp"
android:layout_height="wrap_content" android:textSize="23sp" />
</LinearLayout>

View file

@ -2,5 +2,5 @@
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="19dp" android:textStyle="bold">
android:layout_height="wrap_content" android:textSize="20sp" android:textStyle="bold">
</TextView>

View file

@ -4,17 +4,18 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</LinearLayout>
<TextView android:id="@+id/TextView" android:textSize="16sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" android:text="@string/navigate_point_top_text"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_longitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time">
</EditText>
</LinearLayout>
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow android:layout_width="fill_parent" >
<TextView android:textSize="20sp" android:id="@+id/TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</TableRow>
<TableRow android:layout_width="fill_parent" >
<TextView android:textSize="20sp" android:id="@+id/TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_longitude"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
</TableRow>
</TableLayout>
<RadioGroup android:id="@+id/RadioGroup" android:layout_marginLeft="70dp" android:layout_marginTop="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format1" android:text="@string/navigate_point_format_D"></RadioButton>
@ -23,11 +24,11 @@
</RadioGroup>
<TextView android:id="@+id/ValidateTextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
<TextView android:id="@+id/ValidateTextView" android:textSize="16sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
android:gravity="bottom|center">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom|center">
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button>
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel"></Button>
</LinearLayout>
<Button android:layout_width="125dp" android:layout_toRightOf="@id/ShowOnMap"
android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel" > </Button>
</RelativeLayout>
</LinearLayout>

View file

@ -2,18 +2,18 @@
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_height="fill_parent" android:stretchColumns="1">
<TableRow>
<TextView android:id="@+id/TextView" android:layout_marginLeft="5dp"
android:layout_height="wrap_content" android:text="@string/osb_comment_dialog_message"></TextView>
<EditText android:text="" android:id="@+id/BugMessage" android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
android:layout_height="wrap_content" android:layout_weight="1"></EditText>
android:layout_height="wrap_content" ></EditText>
</TableRow>
<TableRow>
<TextView android:id="@+id/TextView" android:layout_marginLeft="5dp"
android:layout_height="wrap_content" android:text="@string/osb_comment_dialog_author"></TextView>
<EditText android:id="@+id/AuthorName" android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
android:layout_height="wrap_content" android:layout_weight="1" android:text="NoName"></EditText>
android:layout_height="wrap_content" android:text="NoName"></EditText>
</TableRow>

View file

@ -4,10 +4,10 @@
android:orientation="horizontal">
<TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="20px" />
android:layout_height="wrap_content" android:textSize="20sp" />
<ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="@drawable/reset"
android:paddingLeft="2px" android:paddingRight="2px"
android:paddingTop="2px" android:layout_height="wrap_content" />
android:paddingLeft="2dp" android:paddingRight="2dp"
android:paddingTop="2dp" android:layout_height="wrap_content" />
</LinearLayout>

View file

@ -5,7 +5,7 @@
android:layout_height="fill_parent" android:orientation="horizontal">
<TextView android:id="@+id/distance_label" android:layout_marginLeft="5dp"
android:layout_width="80dp" android:layout_height="wrap_content" android:gravity="left"
android:textSize="20px"/>
android:textSize="20sp"/>
<TextView android:id="@+id/label" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:textSize="20px" />
android:layout_height="wrap_content" android:textSize="20sp" />
</LinearLayout>

View file

@ -270,7 +270,6 @@ public class EditingPOIActivity {
subCategories.add(s);
}
}
ArrayAdapter<Object> adapter = new ArrayAdapter<Object>(ctx, R.layout.list_textview, subCategories.toArray());
typeText.setAdapter(adapter);
}

View file

@ -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. */