mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-03 23:55:08 +00:00
Add a dark theme
Summary: BUG: 375376 This revision adds dark mode support to the app ( T7044 ). It does so by injecting theme information into each activity, and making sure that all Views define their colors by reference to theme attributes. In order to make this work, all of the buttons with images (like the list of available devices) now are tinted according to the theme. While all versions of android support the theme, only devices running Android ICS or higher will have a toggle button in the drawer. Test Plan: Open all the screens, both with and without the dark theme on. Reviewers: #kde_connect, mtijink, #vdg, nicolasfella Reviewed By: #kde_connect, mtijink, nicolasfella Subscribers: apol, ngraham, nicolasfella, mtijink Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D11694
This commit is contained in:
committed by
Nicolas Fella
parent
b228fb2377
commit
a1f1693d0b
@@ -37,6 +37,7 @@ import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import org.kde.kdeconnect.BackgroundService;
|
||||
import org.kde.kdeconnect.Device;
|
||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||
import org.kde.kdeconnect_tp.R;
|
||||
|
||||
public class MousePadActivity extends AppCompatActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, MousePadGestureDetector.OnGestureListener {
|
||||
@@ -80,6 +81,7 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ThemeUtil.setUserPreferredTheme(this);
|
||||
|
||||
setContentView(R.layout.activity_mousepad);
|
||||
|
||||
|
Reference in New Issue
Block a user