1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-18 22:41:44 +02:00

update version to 1.8.2 and updated target version to sdk 28

This commit is contained in:
OliE
2018-10-07 12:57:22 +02:00
parent cae3f36668
commit 1f8facacc8
3 changed files with 6 additions and 32 deletions

View File

@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
compileSdkVersion 28
defaultConfig {
applicationId "com.health.openscale"
testApplicationId "com.health.openscale.test"
minSdkVersion 19
targetSdkVersion 27
versionCode 28
versionName "1.8.1"
targetSdkVersion 28
versionCode 29
versionName "1.8.2"
javaCompileOptions {
annotationProcessorOptions { arguments = ["room.schemaLocation":"$projectDir/schemas".toString()] }
@@ -35,7 +35,7 @@ android {
}
ext {
supportLibVersion = '27.1.1'
supportLibVersion = '28.0.0'
}
dependencies {

View File

@@ -124,8 +124,6 @@ public class MainActivity extends BaseAppCompatActivity
}
});
disableShiftMode(navBottomDrawer);
//Create Drawer Toggle
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.open_drawer, R.string.close_drawer){
@@ -719,28 +717,4 @@ public class MainActivity extends BaseAppCompatActivity
break;
}
}
@SuppressLint("RestrictedApi")
private 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);
item.setPadding(0, 20, 0, 0);
// set once again checked value, so view will be updated
//noinspection RestrictedApi
item.setChecked(item.getItemData().isChecked());
}
} catch (NoSuchFieldException e) {
Timber.e(e, "Unable to get shift mode field");
} catch (IllegalAccessException e) {
Timber.e(e, "Unable to change value of shift mode");
}
}
}

View File

@@ -595,7 +595,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
}
private class chartBottomListener implements View.OnTouchListener {
final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
final GestureDetector gestureDetector = new GestureDetector(getContext(), new GestureDetector.SimpleOnGestureListener() {
public void onLongPress(MotionEvent e) {
chartBottom.setCurrentViewport(defaultTopViewport);
}