Fixed 2.3 bugs with little size of download button and not showing menu in localindexes
This commit is contained in:
parent
d0b2773435
commit
134cea1b80
3 changed files with 6 additions and 7 deletions
|
@ -98,7 +98,7 @@
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/DownloadButton"
|
android:id="@+id/DownloadButton"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/bottom_tool_bar_size"
|
||||||
android:background="?attr/downloadButtonBackground"
|
android:background="?attr/downloadButtonBackground"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/download_files"
|
android:text="@string/download_files"
|
||||||
|
|
|
@ -527,15 +527,15 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
||||||
if (j + 1 >= max && optionsMenuAdapter.length() > max) {
|
if (j + 1 >= max && optionsMenuAdapter.length() > max) {
|
||||||
if (split == null) {
|
if (split == null) {
|
||||||
split = menu.addSubMenu(0, 1, j + 1, R.string.default_buttons_other_actions);
|
split = menu.addSubMenu(0, 1, j + 1, R.string.default_buttons_other_actions);
|
||||||
split.setIcon(R.drawable.ic_overflow_menu_light);
|
split.setIcon(R.drawable.ic_overflow_menu_white);
|
||||||
split.getItem();
|
split.getItem();
|
||||||
MenuItemCompat.setShowAsAction(split.getItem(),MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
MenuItemCompat.setShowAsAction(split.getItem(),MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
}
|
}
|
||||||
item = split.add(0, optionsMenuAdapter.getElementId(j), j + 1, optionsMenuAdapter.getItemName(j));
|
item = split.add(0, optionsMenuAdapter.getElementId(j), j + 1, optionsMenuAdapter.getItemName(j));
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS );
|
||||||
} else {
|
} else {
|
||||||
item = menu.add(0, optionsMenuAdapter.getElementId(j), j + 1, optionsMenuAdapter.getItemName(j));
|
item = menu.add(0, optionsMenuAdapter.getElementId(j), j + 1, optionsMenuAdapter.getItemName(j));
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS );
|
||||||
}
|
}
|
||||||
if (optionsMenuAdapter.getImageId(j, isLightActionBar()) != 0) {
|
if (optionsMenuAdapter.getImageId(j, isLightActionBar()) != 0) {
|
||||||
item.setIcon(optionsMenuAdapter.getImageId(j, isLightActionBar()));
|
item.setIcon(optionsMenuAdapter.getImageId(j, isLightActionBar()));
|
||||||
|
|
|
@ -110,8 +110,7 @@ public class UpdatesIndexFragment extends ListFragment {
|
||||||
item.setIcon(R.drawable.ic_action_refresh_dark);
|
item.setIcon(R.drawable.ic_action_refresh_dark);
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
SubMenu s = menu.addSubMenu(0, DownloadIndexFragment.MORE_ID, 0, "");
|
SubMenu s = menu.addSubMenu(0, DownloadIndexFragment.MORE_ID, 0, "");
|
||||||
s.setIcon(isLightActionBar() ? R.drawable.ic_overflow_menu_light
|
s.setIcon(R.drawable.ic_overflow_menu_white);
|
||||||
: R.drawable.ic_overflow_menu_dark);
|
|
||||||
s.add(0, DownloadIndexFragment.SELECT_ALL_ID, 0, R.string.select_all);
|
s.add(0, DownloadIndexFragment.SELECT_ALL_ID, 0, R.string.select_all);
|
||||||
s.add(0, DownloadIndexFragment.DESELECT_ALL_ID, 0, R.string.deselect_all);
|
s.add(0, DownloadIndexFragment.DESELECT_ALL_ID, 0, R.string.deselect_all);
|
||||||
MenuItemCompat.setShowAsAction(s.getItem(), MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
MenuItemCompat.setShowAsAction(s.getItem(), MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
|
|
Loading…
Reference in a new issue