diff --git a/OsmAnd-telegram/build.gradle b/OsmAnd-telegram/build.gradle index 8e4e90c56c..1dada0438a 100644 --- a/OsmAnd-telegram/build.gradle +++ b/OsmAnd-telegram/build.gradle @@ -142,12 +142,12 @@ dependencies { implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") { exclude group: 'org.jetbrains', module: 'annotations' } - implementation 'com.android.support:appcompat-v7:28.0.0-rc01' - implementation 'com.android.support:design:28.0.0-rc01' - implementation 'com.android.support:customtabs:28.0.0-rc01' - implementation 'com.android.support:support-annotations:28.0.0-rc01' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' + implementation 'com.android.support:customtabs:28.0.0' + implementation 'com.android.support:support-annotations:28.0.0' implementation 'commons-logging:commons-logging-api:1.1' - implementation 'com.android.support:recyclerview-v7:28.0.0-rc01' + implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.vividsolutions:jts-core:1.14.0' implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") { exclude group: 'com.android.support' diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index e52705773c..ad11a4448f 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -456,12 +456,12 @@ dependencies { implementation project(path: ':OsmAnd-java', configuration: 'android') implementation project(':OsmAnd-api') implementation 'com.android.support:multidex:1.0.1' - implementation 'com.android.support:gridlayout-v7:27.1.1' - implementation 'com.android.support:cardview-v7:27.1.1' - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:design:27.1.1' - implementation 'com.android.support:customtabs:27.1.1' - implementation 'com.android.support:preference-v7:27.1.1' + implementation 'com.android.support:gridlayout-v7:28.0.0' + implementation 'com.android.support:cardview-v7:28.0.0' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' + implementation 'com.android.support:customtabs:28.0.0' + implementation 'com.android.support:preference-v7:28.0.0' implementation fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs') implementation group: 'commons-logging', name: 'commons-logging', version: '1.2' diff --git a/OsmAnd/res/layout/fragment_map_markers_dialog.xml b/OsmAnd/res/layout/fragment_map_markers_dialog.xml index 30a71dddf5..3bc3e653bb 100644 --- a/OsmAnd/res/layout/fragment_map_markers_dialog.xml +++ b/OsmAnd/res/layout/fragment_map_markers_dialog.xml @@ -91,6 +91,7 @@ android:layout_height="wrap_content" android:background="?attr/bg_color" app:itemBackground="?attr/bg_color" + app:labelVisibilityMode="labeled" app:itemIconTint="@color/bottom_navigation_color_selector_light" app:itemTextColor="@color/bottom_navigation_color_selector_light" app:menu="@menu/map_markers_bottom_navigation"/> diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java index 0caa56c355..cbb0bd2764 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java @@ -23,7 +23,6 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; -import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.LatLon; import net.osmand.plus.LockableViewPager; @@ -41,7 +40,6 @@ import net.osmand.plus.mapmarkers.DirectionIndicationDialogFragment.DirectionInd import net.osmand.plus.mapmarkers.OptionsBottomSheetDialogFragment.MarkerOptionsFragmentListener; import net.osmand.plus.mapmarkers.OrderByBottomSheetDialogFragment.OrderByFragmentListener; import net.osmand.plus.mapmarkers.SaveAsTrackBottomSheetDialogFragment.MarkerSaveAsTrackFragmentListener; -import net.osmand.plus.widgets.tools.BottomNavigationViewHelper; import java.util.ArrayList; import java.util.Arrays; @@ -171,7 +169,6 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm TextView toolbarTitle = mainView.findViewById(R.id.map_markers_toolbar_title); bottomNav = mainView.findViewById(R.id.map_markers_bottom_navigation); - BottomNavigationViewHelper.disableShiftMode(bottomNav); toolbarTitle.setTextColor(ContextCompat.getColor(getContext(), lightTheme ? R.color.active_buttons_and_links_text_light : R.color.text_color_primary_dark)); bottomNav.setItemIconTintList(ContextCompat.getColorStateList(getContext(), lightTheme ? R.color.bottom_navigation_color_selector_light : R.color.bottom_navigation_color_selector_dark)); bottomNav.setItemTextColor(ContextCompat.getColorStateList(getContext(), lightTheme ? R.color.bottom_navigation_color_selector_light : R.color.bottom_navigation_color_selector_dark)); diff --git a/OsmAnd/src/net/osmand/plus/widgets/tools/BottomNavigationViewHelper.java b/OsmAnd/src/net/osmand/plus/widgets/tools/BottomNavigationViewHelper.java deleted file mode 100644 index de23f4f12b..0000000000 --- a/OsmAnd/src/net/osmand/plus/widgets/tools/BottomNavigationViewHelper.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.osmand.plus.widgets.tools; - -import android.support.design.internal.BottomNavigationItemView; -import android.support.design.internal.BottomNavigationMenuView; -import android.support.design.widget.BottomNavigationView; -import android.util.Log; - -import java.lang.reflect.Field; - -public class BottomNavigationViewHelper { - - private static final String TAG = "BNVHelper"; - - public static void disableShiftMode(BottomNavigationView view) { - BottomNavigationMenuView menuView = (BottomNavigationMenuView) view.getChildAt(0); - try { - Field shiftingMode = menuView.getClass().getDeclaredField("mShiftingMode"); - shiftingMode.setAccessible(true); - shiftingMode.setBoolean(menuView, false); - shiftingMode.setAccessible(false); - for (int i = 0; i < menuView.getChildCount(); i++) { - BottomNavigationItemView item = (BottomNavigationItemView) menuView.getChildAt(i); - // noinspection RestrictedApi - item.setShiftingMode(false); - // set once again checked value, so view will be updated - // noinspection RestrictedApi - item.setChecked(item.getItemData().isChecked()); - } - } catch (NoSuchFieldException e) { - Log.e(TAG, "Unable to get shift mode field", e); - } catch (IllegalAccessException e) { - Log.e(TAG, "Unable to change value of shift mode", e); - } - } -}