2018-03-03 16:06:52 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2006 The Android Open Source Project
|
2015-08-20 01:00:05 -07:00
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
|
|
|
|
2020-06-04 07:56:22 +00:00
|
|
|
<!-- Layout for a Preference in a PreferenceActivity. The bound
|
|
|
|
Preference will place a specific widget representing that
|
|
|
|
Preference in the "widget_frame" ViewGroup in this file. -->
|
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
2018-04-23 18:31:44 +02:00
|
|
|
<LinearLayout
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
2020-04-29 23:04:00 -04:00
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
2015-08-20 01:00:05 -07:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2020-04-29 23:04:00 -04:00
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
>
|
2015-08-20 01:00:05 -07:00
|
|
|
<RelativeLayout
|
2020-04-29 23:04:00 -04:00
|
|
|
android:id="@+id/content"
|
2015-08-20 01:00:05 -07:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
2020-04-29 23:04:00 -04:00
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:padding="16dp"
|
|
|
|
android:minHeight="?android:attr/listPreferredItemHeight"
|
|
|
|
>
|
2018-03-03 16:06:52 +01:00
|
|
|
<TextView
|
2018-10-26 23:41:32 +02:00
|
|
|
android:id="@android:id/title"
|
2015-08-20 01:00:05 -07:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:ellipsize="marquee"
|
2018-03-03 16:06:52 +01:00
|
|
|
android:fadingEdge="horizontal"
|
|
|
|
android:singleLine="true"
|
2020-04-29 23:04:00 -04:00
|
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
|
|
tools:text="Plugin title"
|
|
|
|
/>
|
2018-03-03 16:06:52 +01:00
|
|
|
<TextView
|
|
|
|
android:id="@android:id/summary"
|
2015-08-20 01:00:05 -07:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2018-03-03 16:06:52 +01:00
|
|
|
android:layout_alignStart="@android:id/title"
|
|
|
|
android:layout_below="@android:id/title"
|
|
|
|
android:maxLines="3"
|
2015-08-20 01:00:05 -07:00
|
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
2020-04-29 23:04:00 -04:00
|
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
|
|
tools:text="Plugin description"
|
|
|
|
/>
|
2015-08-20 01:00:05 -07:00
|
|
|
</RelativeLayout>
|
2020-06-04 07:56:22 +00:00
|
|
|
<!--
|
|
|
|
NB: This divider (below) should only become visible if the
|
|
|
|
preference links to additional settings. In practical terms,
|
|
|
|
that's when calling '::hasSettings' on the associated Plugin
|
|
|
|
returns true.
|
|
|
|
-->
|
2020-04-29 23:04:00 -04:00
|
|
|
<View
|
|
|
|
android:id="@+id/divider"
|
|
|
|
android:layout_width="1dp"
|
|
|
|
android:layout_height="32dp"
|
|
|
|
android:layout_gravity="center"
|
2024-04-05 13:38:39 +02:00
|
|
|
android:background="?colorPrimary"
|
2020-04-29 23:04:00 -04:00
|
|
|
/>
|
|
|
|
<!-- Preference will place its actual preference widget here. -->
|
|
|
|
<LinearLayout
|
|
|
|
android:id="@android:id/widget_frame"
|
2015-08-20 01:00:05 -07:00
|
|
|
android:layout_width="wrap_content"
|
2020-04-29 23:04:00 -04:00
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:gravity="center"
|
|
|
|
android:padding="16dp"
|
|
|
|
android:orientation="vertical"
|
|
|
|
/>
|
2015-08-20 01:00:05 -07:00
|
|
|
</LinearLayout>
|