Merge branch 'master' of github.com:osmandapp/Osmand
This commit is contained in:
commit
c90d37fcab
5 changed files with 16 additions and 4 deletions
|
@ -120,7 +120,10 @@
|
||||||
android:text="@string/download_files"
|
android:text="@string/download_files"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<net.osmand.plus.activities.search.toolbar.SplitToolbar
|
||||||
|
android:id="@+id/bottomControls"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</TabHost>
|
</TabHost>
|
|
@ -131,6 +131,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
|
menu = ((FavouritesActivity) getActivity()).getClearToolbar(true).getMenu();
|
||||||
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
|
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
|
||||||
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
|
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
|
||||||
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import net.osmand.plus.GpxSelectionHelper;
|
import net.osmand.plus.GpxSelectionHelper;
|
||||||
|
@ -53,9 +54,6 @@ public class FavouritesActivity extends ActionBarActivity {
|
||||||
//class in com.actionbarsherlock.view and NOT android.view
|
//class in com.actionbarsherlock.view and NOT android.view
|
||||||
((OsmandApplication) getApplication()).applyTheme(this);
|
((OsmandApplication) getApplication()).applyTheme(this);
|
||||||
supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
|
||||||
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
|
|
||||||
}
|
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
setSupportProgressBarIndeterminateVisibility(false);
|
setSupportProgressBarIndeterminateVisibility(false);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
@ -140,6 +138,13 @@ public class FavouritesActivity extends ActionBarActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Toolbar getClearToolbar(boolean visible) {
|
||||||
|
final Toolbar tb = (Toolbar) findViewById(R.id.bottomControls);
|
||||||
|
tb.setTitle(null);
|
||||||
|
tb.getMenu().clear();
|
||||||
|
tb.setVisibility(visible? View.VISIBLE : View.GONE);
|
||||||
|
return tb;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
|
|
@ -30,6 +30,7 @@ import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.TargetPointsHelper;
|
import net.osmand.plus.TargetPointsHelper;
|
||||||
|
import net.osmand.plus.activities.search.SearchActivity;
|
||||||
import net.osmand.plus.base.FavoriteImageDrawable;
|
import net.osmand.plus.base.FavoriteImageDrawable;
|
||||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
import net.osmand.plus.dialogs.DirectionsDialogs;
|
||||||
import net.osmand.plus.helpers.ColorDialogs;
|
import net.osmand.plus.helpers.ColorDialogs;
|
||||||
|
@ -299,6 +300,7 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
|
menu = ((FavouritesActivity) getActivity()).getClearToolbar(true).getMenu();
|
||||||
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
|
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
|
||||||
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
|
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
|
||||||
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
||||||
|
|
|
@ -243,6 +243,7 @@ public class SelectedGPXFragment extends OsmandExpandableListFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
|
((FavouritesActivity) getActivity()).getClearToolbar(false);
|
||||||
// MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
|
// MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
|
||||||
// R.drawable.ic_action_search_dark, MenuItem.SHOW_AS_ACTION_ALWAYS
|
// R.drawable.ic_action_search_dark, MenuItem.SHOW_AS_ACTION_ALWAYS
|
||||||
// | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
// | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
|
||||||
|
|
Loading…
Reference in a new issue