add control statu bar
This commit is contained in:
@@ -73,6 +73,12 @@ public class MainActivity extends ImmerseBaseActivity {
|
||||
@BindView(R.id.bt_bar_hide)
|
||||
Button bt_bar_hide;
|
||||
|
||||
@BindView(R.id.bt_statusbar_show)
|
||||
Button bt_statusbar_show;
|
||||
@BindView(R.id.bt_statusbar_hide)
|
||||
Button bt_statusbar_hide;
|
||||
|
||||
|
||||
@BindView(R.id.bt_bc_boot)
|
||||
Button bt_bc_boot;
|
||||
@BindView(R.id.bt_start_jgy)
|
||||
@@ -154,37 +160,33 @@ public class MainActivity extends ImmerseBaseActivity {
|
||||
int qch_app_browser = Settings.System.getInt(getContentResolver(), "qch_app_browser", 0);
|
||||
Log.e(TAG, "debugTest: qch_app_browser = " + qch_app_browser);
|
||||
});
|
||||
bt_bar_show.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String navigationStatus = "qch_show_NavigationBar_config";
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
sendBroadcast(navIntent);
|
||||
}
|
||||
bt_bar_show.setOnClickListener(v -> {
|
||||
String navigationStatus = "aole_show_NavigationBar";
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
sendBroadcast(navIntent);
|
||||
});
|
||||
bt_bar_hide.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String navigationStatus = "qch_hide_NavigationBar_config";
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
sendBroadcast(navIntent);
|
||||
}
|
||||
bt_bar_hide.setOnClickListener(v -> {
|
||||
String navigationStatus = "aole_hide_NavigationBar";
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
sendBroadcast(navIntent);
|
||||
});
|
||||
bt_statusbar_show.setOnClickListener(view -> {
|
||||
String statusbarStatus = "aole_show_statusBar";
|
||||
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
sendBroadcast(statusIntent);
|
||||
});
|
||||
bt_statusbar_hide.setOnClickListener(view -> {
|
||||
String statusbarStatus = "aole_hide_statusBar";
|
||||
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
sendBroadcast(statusIntent);
|
||||
});
|
||||
|
||||
bt_bc_boot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
CmdUtil.execute("am broadcast -a android.intent.action.BOOT_COMPLETED");
|
||||
}
|
||||
});
|
||||
bt_bc_boot.setOnClickListener(view -> CmdUtil.execute("am broadcast -a android.intent.action.BOOT_COMPLETED"));
|
||||
|
||||
bt_start_jgy.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
JGYUtils.getInstance().wakeUpAppstore();
|
||||
JGYUtils.getInstance().wakeUpDeviceInfo();
|
||||
JGYUtils.getInstance().wakeUpNotify();
|
||||
}
|
||||
bt_start_jgy.setOnClickListener(view -> {
|
||||
JGYUtils.getInstance().wakeUpAppstore();
|
||||
JGYUtils.getInstance().wakeUpDeviceInfo();
|
||||
JGYUtils.getInstance().wakeUpNotify();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,22 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_on"
|
||||
app:layout_constraintTop_toTopOf="@+id/accessory" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_statusbar_show"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="status_bar_show"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_on"
|
||||
app:layout_constraintTop_toTopOf="@+id/accessory" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_statusbar_hide"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="status_bar_hide"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_on"
|
||||
app:layout_constraintTop_toTopOf="@+id/accessory" />
|
||||
|
||||
<com.ttstd.viewlibrary.ToggleButton2
|
||||
android:id="@+id/disable_switch"
|
||||
android:layout_width="80dp"
|
||||
|
||||
@@ -33,6 +33,22 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_on"
|
||||
app:layout_constraintTop_toTopOf="@+id/accessory" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_statusbar_show"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="status_bar_show"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_on"
|
||||
app:layout_constraintTop_toTopOf="@+id/accessory" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_statusbar_hide"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="status_bar_hide"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_on"
|
||||
app:layout_constraintTop_toTopOf="@+id/accessory" />
|
||||
|
||||
<com.ttstd.viewlibrary.ToggleButton2
|
||||
android:id="@+id/disable_switch"
|
||||
android:layout_width="80dp"
|
||||
|
||||
Reference in New Issue
Block a user