Skip to content

Commit

Permalink
Attempt for #1018
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantcheese committed Jul 30, 2020
1 parent d2184f4 commit 767d318
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package com.github.adamantcheese.chan;

import android.app.AlertDialog;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
Expand All @@ -30,6 +29,7 @@
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.util.Pair;
import androidx.lifecycle.Lifecycle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.github.adamantcheese.chan.core.manager;

import android.Manifest;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
Expand All @@ -29,6 +28,7 @@
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.FileProvider;

import com.github.adamantcheese.chan.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.core.presenter;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.controller;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.ui.controller;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.view.Gravity;
import android.view.MotionEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.controller;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.net.ConnectivityManager;
import android.view.Gravity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.ui.controller;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.MotionEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.controller;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import android.Manifest;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.ui.controller;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import android.Manifest;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.adamantcheese.chan.ui.controller.settings;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.controller.settings;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.net.Uri;
import android.widget.Toast;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.controller.settings;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.view.ViewGroup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.ui.controller.settings;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.adamantcheese.chan.ui.controller.settings.base_directory

import android.app.AlertDialog
import androidx.appcompat.app.AlertDialog
import android.content.Context
import com.github.adamantcheese.chan.R
import com.github.adamantcheese.chan.core.presenter.MediaSettingsControllerPresenter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.adamantcheese.chan.ui.controller.settings.base_directory

import android.app.AlertDialog
import androidx.appcompat.app.AlertDialog
import android.content.Context
import android.widget.Toast
import com.github.adamantcheese.chan.R
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.adamantcheese.chan.ui.controller.settings.base_directory

import android.app.AlertDialog
import androidx.appcompat.app.AlertDialog
import android.content.Context
import com.github.adamantcheese.chan.R
import com.github.adamantcheese.chan.core.database.DatabaseManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.ui.helper;

import android.app.Activity;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.github.adamantcheese.chan.ui.layout;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.content.Context;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Build;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.settings;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.text.InputType;
import android.view.View;
import android.view.WindowManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package com.github.adamantcheese.chan.ui.settings;

import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
Expand Down
26 changes: 26 additions & 0 deletions Kuroba/app/src/main/res/drawable/dialog_material_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="16dp"
android:insetTop="16dp"
android:insetRight="16dp"
android:insetBottom="16dp">
<shape android:shape="rectangle">
<corners android:radius="2dp" />
<solid android:color="?backcolor" />
</shape>
</inset>
8 changes: 4 additions & 4 deletions Kuroba/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<item name="snackbarButtonStyle">@style/SnackbarButtonStyle</item>
<item name="colorSurface">@color/white</item>
<item name="textAppearanceBody2">@style/TextAppearance.MaterialComponents.Body2</item>
<item name="android:alertDialogTheme">@style/AlertDialogStyle</item>
<item name="alertDialogTheme">@style/AlertDialogTheme</item>
<item name="android:listPopupWindowStyle">@style/ListPopupWindowStyle</item>

<item name="colorControlNormal">@color/textColorSecondary</item>
Expand All @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<item name="snackbarButtonStyle">@style/SnackbarButtonStyle</item>
<item name="colorSurface">@color/white</item>
<item name="textAppearanceBody2">@style/TextAppearance.MaterialComponents.Body2</item>
<item name="android:alertDialogTheme">@style/AlertDialogStyle</item>
<item name="alertDialogTheme">@style/AlertDialogTheme</item>
<item name="android:listPopupWindowStyle">@style/ListPopupWindowStyle</item>

<item name="colorControlNormal">@color/textColorSecondary</item>
Expand Down Expand Up @@ -668,8 +668,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<item name="android:textSize">14sp</item>
</style>

<style name="AlertDialogStyle" parent="@style/ThemeOverlay.AppCompat.Dialog.Alert">
<item name="android:windowBackground">?backcolor</item>
<style name="AlertDialogTheme" parent="@style/ThemeOverlay.AppCompat.Dialog.Alert">
<item name="android:windowBackground">@drawable/dialog_material_background</item>
</style>

<style name="ListPopupWindowStyle" parent="Widget.AppCompat.ListPopupWindow">
Expand Down

0 comments on commit 767d318

Please sign in to comment.