mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-20 07:21:40 +02:00
update version to 1.8.2 and updated target version to sdk 28
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.health.openscale"
|
applicationId "com.health.openscale"
|
||||||
testApplicationId "com.health.openscale.test"
|
testApplicationId "com.health.openscale.test"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
targetSdkVersion 27
|
targetSdkVersion 28
|
||||||
versionCode 28
|
versionCode 29
|
||||||
versionName "1.8.1"
|
versionName "1.8.2"
|
||||||
|
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
annotationProcessorOptions { arguments = ["room.schemaLocation":"$projectDir/schemas".toString()] }
|
annotationProcessorOptions { arguments = ["room.schemaLocation":"$projectDir/schemas".toString()] }
|
||||||
@@ -35,7 +35,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
supportLibVersion = '27.1.1'
|
supportLibVersion = '28.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@@ -124,8 +124,6 @@ public class MainActivity extends BaseAppCompatActivity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
disableShiftMode(navBottomDrawer);
|
|
||||||
|
|
||||||
//Create Drawer Toggle
|
//Create Drawer Toggle
|
||||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.open_drawer, R.string.close_drawer){
|
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.open_drawer, R.string.close_drawer){
|
||||||
|
|
||||||
@@ -719,28 +717,4 @@ public class MainActivity extends BaseAppCompatActivity
|
|||||||
break;
|
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -595,7 +595,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class chartBottomListener implements View.OnTouchListener {
|
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) {
|
public void onLongPress(MotionEvent e) {
|
||||||
chartBottom.setCurrentViewport(defaultTopViewport);
|
chartBottom.setCurrentViewport(defaultTopViewport);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user