Updated support library to 25.1.0
This commit is contained in:
parent
5341e0b98a
commit
3058dbc18b
6 changed files with 46 additions and 21 deletions
|
|
@ -106,26 +106,26 @@ dependencies {
|
|||
transitive = true
|
||||
}
|
||||
|
||||
compile('com.github.kabouzeid:app-theme-helper:1.3.2') {
|
||||
compile('com.github.kabouzeid:app-theme-helper:1.3.3') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
compile 'com.android.support:support-compat:25.0.1'
|
||||
compile 'com.android.support:support-core-utils:25.0.1'
|
||||
compile 'com.android.support:support-core-ui:25.0.1'
|
||||
compile 'com.android.support:support-media-compat:25.0.1'
|
||||
compile 'com.android.support:support-fragment:25.0.1'
|
||||
compile 'com.android.support:support-v13:25.0.1'
|
||||
compile 'com.android.support:appcompat-v7:25.0.1'
|
||||
compile 'com.android.support:recyclerview-v7:25.0.1'
|
||||
compile 'com.android.support:gridlayout-v7:25.0.1'
|
||||
compile 'com.android.support:cardview-v7:25.0.1'
|
||||
compile 'com.android.support:palette-v7:25.0.1'
|
||||
compile 'com.android.support:design:25.0.1'
|
||||
compile 'com.android.support:support-annotations:25.0.1'
|
||||
compile 'com.android.support:percent:25.0.1'
|
||||
compile 'com.android.support:preference-v7:25.0.1'
|
||||
compile 'com.android.support:preference-v14:25.0.1'
|
||||
compile 'com.android.support:support-compat:25.1.0'
|
||||
compile 'com.android.support:support-core-utils:25.1.0'
|
||||
compile 'com.android.support:support-core-ui:25.1.0'
|
||||
compile 'com.android.support:support-media-compat:25.1.0'
|
||||
compile 'com.android.support:support-fragment:25.1.0'
|
||||
compile 'com.android.support:support-v13:25.1.0'
|
||||
compile 'com.android.support:appcompat-v7:25.1.0'
|
||||
compile 'com.android.support:recyclerview-v7:25.1.0'
|
||||
compile 'com.android.support:gridlayout-v7:25.1.0'
|
||||
compile 'com.android.support:cardview-v7:25.1.0'
|
||||
compile 'com.android.support:palette-v7:25.1.0'
|
||||
compile 'com.android.support:design:25.1.0'
|
||||
compile 'com.android.support:support-annotations:25.1.0'
|
||||
compile 'com.android.support:percent:25.1.0'
|
||||
compile 'com.android.support:preference-v7:25.1.0'
|
||||
compile 'com.android.support:preference-v14:25.1.0'
|
||||
|
||||
compile 'com.afollestad.material-dialogs:core:0.9.1.0@aar'
|
||||
compile 'com.afollestad.material-dialogs:commons:0.9.1.0@aar'
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity {
|
|||
}
|
||||
|
||||
private void setCurrentFragment(@SuppressWarnings("NullableProblems") Fragment fragment) {
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment, LibraryFragment.TAG).commit();
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment, null).commit();
|
||||
currentFragment = (MainActivityFragmentCallbacks) fragment;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
package com.kabouzeid.gramophone.ui.fragments.mainactivity;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.View;
|
||||
|
||||
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||
import com.kabouzeid.appthemehelper.util.ColorUtil;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.ui.activities.MainActivity;
|
||||
|
||||
/**
|
||||
|
|
@ -19,4 +24,24 @@ public abstract class AbsMainActivityFragment extends Fragment {
|
|||
super.onActivityCreated(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
// WORKAROUND
|
||||
public void setStatusbarColor(View view, int color) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
final View statusBar = view.findViewById(R.id.status_bar);
|
||||
if (statusBar != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
statusBar.setBackgroundColor(ColorUtil.darkenColor(color));
|
||||
getMainActivity().setLightStatusbarAuto(color);
|
||||
} else {
|
||||
statusBar.setBackgroundColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setStatusbarColorAuto(View view) {
|
||||
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
|
||||
setStatusbarColor(view, ThemeStore.primaryColor(getContext()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
|
||||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
getMainActivity().setStatusbarColorAuto();
|
||||
setStatusbarColorAuto(view);
|
||||
getMainActivity().setNavigationbarColorAuto();
|
||||
getMainActivity().setTaskDescriptionColorAuto();
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
|
||||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
getMainActivity().setStatusbarColorAuto();
|
||||
setStatusbarColorAuto(view);
|
||||
getMainActivity().setNavigationbarColorAuto();
|
||||
getMainActivity().setTaskDescriptionColorAuto();
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||
classpath 'com.github.triplet.gradle:play-publisher:1.1.5'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue