Commit a5638ec9 authored by Suphon Thanakornpakapong's avatar Suphon Thanakornpakapong Committed by Romain Hunault
Browse files

Hide status bar in widgets page

parent e011b379
......@@ -72,24 +72,20 @@ android {
apiNougat {
dimension "api"
minSdkVersion 24
compileSdkVersion 25
}
apiOreo {
dimension "api"
minSdkVersion 26
compileSdkVersion 28
targetSdkVersion 28
}
apiQ {
dimension "api"
minSdkVersion 29
compileSdkVersion 29
targetSdkVersion 29
}
apiR {
dimension "api"
minSdkVersion 29
compileSdkVersion 29
targetSdkVersion 29
}
}
......
......@@ -69,6 +69,8 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.view.GestureDetectorCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.core.view.WindowInsetsControllerCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
......@@ -247,6 +249,8 @@ public class LauncherActivity extends AppCompatActivity implements
private int mThemeRes = R.style.HomeScreenTheme;
private LayoutInflater mLightLayoutInflater;
private WindowInsetsControllerCompat mInsetsController;
public static LauncherActivity getLauncher(Context context) {
if (context instanceof LauncherActivity) {
return (LauncherActivity) context;
......@@ -333,6 +337,8 @@ public class LauncherActivity extends AppCompatActivity implements
}
final ContextThemeWrapper lightContext = new ContextThemeWrapper(this, R.style.HomeScreenTheme);
mLightLayoutInflater = getLayoutInflater().cloneInContext(lightContext);
mInsetsController = new WindowInsetsControllerCompat(getWindow(), mLauncherView);
}
public View getRootView() {
......@@ -1236,6 +1242,10 @@ public class LauncherActivity extends AppCompatActivity implements
intent.setAction(WeatherUpdateService.ACTION_FORCE_UPDATE);
startService(intent);
}
mInsetsController.hide(WindowInsetsCompat.Type.statusBars());
} else {
mInsetsController.show(WindowInsetsCompat.Type.statusBars());
}
dragDropEnabled = true;
......
......@@ -17,6 +17,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:enforceNavigationBarContrast">false</item>
<item name="android:enforceStatusBarContrast">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="searchBarTheme">@style/SearchBar</item>
</style>
......
package foundation.e.blisslauncher.buildsrc
object Versions {
const val compile_sdk = 29
const val compile_sdk = 31
const val min_sdk = 24
const val target_sdk = 29
const val android_gradle_plugin = "3.5.0"
......@@ -49,7 +49,7 @@ object Libs {
}
object AndroidX {
const val appcompat = "androidx.appcompat:appcompat:1.1.0-rc01"
const val appcompat = "androidx.appcompat:appcompat:1.4.1"
const val collection = "androidx.collection:collection-ktx:1.1.0"
const val palette = "androidx.palette:palette:1.0.0"
const val recyclerview = "androidx.recyclerview:recyclerview:1.1.0-beta03"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment