Updated layout for Search Activity - Origin for Address and Favorites
This commit is contained in:
parent
ed4da2f033
commit
732281578e
6 changed files with 15 additions and 7 deletions
8
OsmAnd/res/layout/single_fragment_layout.xml
Normal file
8
OsmAnd/res/layout/single_fragment_layout.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:id="@android:id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
|
@ -46,8 +46,6 @@ public class FavoritesActivity extends TabActivity {
|
|||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
//This has to be called before setContentView and you must use the
|
||||
//class in com.actionbarsherlock.view and NOT android.view
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
super.onCreate(icicle);
|
||||
getSupportActionBar().setTitle(R.string.favorites_Button);
|
||||
|
|
|
@ -2,6 +2,8 @@ package net.osmand.plus.activities;
|
|||
|
||||
import android.view.MenuItem;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
|
||||
|
@ -11,6 +13,7 @@ public class FavoritesListActivity extends OsmandActionBarActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.single_fragment_layout);
|
||||
if (savedInstanceState == null) {
|
||||
// During initial setup, plug in the details fragment.
|
||||
FavoritesListFragment details = new FavoritesListFragment();
|
||||
|
|
|
@ -81,7 +81,6 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
private Set<FavoriteGroup> groupsToDelete = new LinkedHashSet<FavoriteGroup>();
|
||||
private ActionMode actionMode;
|
||||
private SearchView searchView;
|
||||
protected boolean hideActionBar;
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
|
|
|
@ -5,6 +5,8 @@ import android.view.MenuItem;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.OsmandActionBarActivity;
|
||||
|
||||
|
||||
|
@ -13,10 +15,8 @@ public class SearchAddressActivity extends OsmandActionBarActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.single_fragment_layout);
|
||||
if (savedInstanceState == null) {
|
||||
// During initial setup, plug in the details fragment.
|
||||
SearchAddressFragment details = new SearchAddressFragment();
|
||||
|
|
|
@ -97,7 +97,7 @@ public class SearchAddressFragment extends Fragment {
|
|||
if(getActivity() instanceof SearchAddressActivity) {
|
||||
MenuItem menuItem = menu.add(0, SELECT_POINT, 0, "");
|
||||
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_ok_light : R.drawable.ic_action_ok_dark);
|
||||
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_ok_dark : R.drawable.ic_action_ok_dark);
|
||||
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
|
|
Loading…
Reference in a new issue