Implementing search activity ui changes
BIN
OsmAnd/res/drawable-hdpi/tab_search_panel_normal.9.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.8 KiB |
BIN
OsmAnd/res/drawable-hdpi/tab_search_panel_pushed.9.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.4 KiB |
7
OsmAnd/res/drawable/tab_back_button.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/tab_back_button_background_pushed" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/tab_back_button_background_normal"/>
|
||||
|
||||
</selector>
|
7
OsmAnd/res/drawable/tab_icon_background.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/tab_icon_panel_pushed" android:state_selected="true"/>
|
||||
<item android:drawable="@drawable/tab_icon_panel"/>
|
||||
|
||||
</selector>
|
BIN
OsmAnd/res/drawable/tab_search_panel_normal.9.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.8 KiB |
BIN
OsmAnd/res/drawable/tab_search_panel_pushed.9.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.7 KiB |
7
OsmAnd/res/drawable/tab_search_panel_selector.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/tab_search_panel_pushed" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/tab_search_panel_normal"/>
|
||||
|
||||
</selector>
|
|
@ -2,18 +2,33 @@
|
|||
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
android:layout_height="fill_parent"
|
||||
style="@style/OsmandActivity">
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:orientation="vertical">
|
||||
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/search_back_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:background="@drawable/tab_back_button"
|
||||
android:text="" />
|
||||
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:layout_marginLeft = "3dp" android:text="@string/select_search_position" android:layout_gravity="center_vertical|left">
|
||||
android:layout_marginLeft = "3dp" android:text="@string/select_search_position" android:layout_gravity="center_vertical|left"
|
||||
style="@style/OsmandActivity">
|
||||
</TextView>
|
||||
<Spinner android:layout_marginLeft = "5dp" android:id="@+id/SpinnerLocation"
|
||||
android:drawSelectorOnTop="true" android:layout_width="fill_parent" android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerLocation"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/tab_search_panel_selector"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_width="fill_parent"
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
android:paddingLeft="2dp" android:paddingRight="2dp"
|
||||
android:paddingTop="2dp" android:layout_height="fill_parent" />
|
||||
<TextView android:id="@+id/folder_label" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:textSize="25sp" />
|
||||
android:layout_height="wrap_content" android:textSize="25sp"
|
||||
style="@style/WhiteText"/>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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>
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:divider="@drawable/tab_text_separator">
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
8
OsmAnd/res/values/colors.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="activity_background">#6A6A6A</color>
|
||||
<color name="list_separator">#494949</color>
|
||||
<color name="activity_text">#FFFFFF</color>
|
||||
|
||||
</resources>
|
|
@ -44,4 +44,11 @@
|
|||
<item name="@android:windowEnterAnimation">@anim/grow_from_bottom</item>
|
||||
<item name="@android:windowExitAnimation">@anim/shrink_from_top</item>
|
||||
</style>
|
||||
<style name="OsmandActivity">
|
||||
<item name="android:textColor">@color/activity_text</item>
|
||||
<item name="android:background">@color/activity_background</item>
|
||||
</style>
|
||||
<style name="WhiteText">
|
||||
<item name="android:textColor">@color/activity_text</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -73,17 +73,25 @@ public class SearchActivity extends TabActivity {
|
|||
|
||||
private View getTabIndicator(int imageId){
|
||||
View r = getLayoutInflater().inflate(R.layout.search_main_tab_header, getTabHost(), false);
|
||||
((ImageView)r.findViewById(R.id.TabImage)).setImageResource(imageId);
|
||||
ImageView tabImage = (ImageView)r.findViewById(R.id.TabImage);
|
||||
tabImage.setImageResource(imageId);
|
||||
tabImage.setBackgroundResource(R.drawable.tab_icon_background);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(R.layout.search_main);
|
||||
|
||||
Button backButton = (Button) findViewById(R.id.search_back_button);
|
||||
backButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SearchActivity.this.finish();
|
||||
}
|
||||
});
|
||||
|
||||
spinner = (Spinner) findViewById(R.id.SpinnerLocation);
|
||||
spinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,
|
||||
|
@ -97,7 +105,7 @@ public class SearchActivity extends TabActivity {
|
|||
);
|
||||
|
||||
|
||||
TabHost host = getTabHost();
|
||||
TabHost host = getTabHost();
|
||||
host.addTab(host.newTabSpec("Search_POI").setIndicator(getTabIndicator(R.drawable.tab_search_poi_icon)).
|
||||
setContent(new Intent(this, SearchPoiFilterActivity.class))); //$NON-NLS-1$
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ public class SearchPoiFilterActivity extends ListActivity {
|
|||
} else {
|
||||
label.setTypeface(Typeface.DEFAULT);
|
||||
}
|
||||
icon.setImageResource(model.isStandardFilter() ? R.drawable.folder : R.drawable.favorites);
|
||||
icon.setImageResource(model.isStandardFilter() ? R.drawable.folder : R.drawable.tab_icon_favourite_menu);
|
||||
return (row);
|
||||
}
|
||||
|
||||
|
|