Quick access for hiding the notification in status bar
This commit is contained in:
parent
54d42090c1
commit
8c956fb4a0
|
@ -52,6 +52,7 @@ import android.widget.CheckBox;
|
|||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioGroup;
|
||||
|
@ -1740,13 +1741,25 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
|
|||
final Button sound_poll = rootView.findViewById(R.id.sound_poll);
|
||||
final Button sound_backup = rootView.findViewById(R.id.sound_backup);
|
||||
final Button sound_media = rootView.findViewById(R.id.sound_media);
|
||||
final ImageButton set_hide_status_bar = rootView.findViewById(R.id.set_hide_status_bar);
|
||||
Button set_notif_sound = rootView.findViewById(R.id.set_notif_sound);
|
||||
settings_time_from.setText(time_from);
|
||||
settings_time_to.setText(time_to);
|
||||
|
||||
final LinearLayout set_hide_status_bar_container = rootView.findViewById(R.id.set_hide_status_bar_container);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
set_notif_sound.setVisibility(View.GONE);
|
||||
channels_container.setVisibility(View.VISIBLE);
|
||||
set_hide_status_bar_container.setVisibility(View.VISIBLE);
|
||||
set_hide_status_bar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
|
||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
|
||||
intent.putExtra(Settings.EXTRA_CHANNEL_ID, LiveNotificationService.CHANNEL_ID);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
sound_boost.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zM12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
|
||||
</vector>
|
|
@ -470,6 +470,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- NOTIFICATIONS -->
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_notifications"
|
||||
|
@ -528,6 +529,42 @@
|
|||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/settings_checkbox_margin"
|
||||
android:layout_marginBottom="@dimen/settings_checkbox_margin"
|
||||
android:id="@+id/set_hide_status_bar_container"
|
||||
android:orientation="horizontal">
|
||||
<ImageButton
|
||||
android:id="@+id/set_hide_status_bar"
|
||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="5dp"
|
||||
android:contentDescription="@string/bookmark_add"
|
||||
android:src="@drawable/ic_hide_status_bar"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:textSize="16sp"
|
||||
android:text="@string/set_hide_status_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:textColor="@color/mastodonC2"
|
||||
android:text="@string/set_hide_status_bar_indication"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notification_settings"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1207,4 +1207,6 @@
|
|||
<string name="set_invidious">Replace Youtube with Invidio.us</string>
|
||||
<string name="set_invidious_indication">Invidious is an alternative front-end to YouTube</string>
|
||||
<string name="set_invidious_host">Enter your custom host or leave blank for using invidio.us</string>
|
||||
<string name="set_hide_status_bar">Hide Fedilab notification bar</string>
|
||||
<string name="set_hide_status_bar_indication">For hiding the remaining notification in the status bar, click on the button then uncheck: \"Display in status bar\"</string>
|
||||
</resources>
|
Loading…
Reference in New Issue