mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
respect light/dark theming
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
e224e093b0
commit
c461ddca5b
@ -83,6 +83,7 @@ import androidx.annotation.DrawableRes;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.graphics.drawable.DrawableCompat;
|
import androidx.core.graphics.drawable.DrawableCompat;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
@ -776,7 +777,12 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
if (!TextUtils.isEmpty(item.text) || controller.edit) {
|
if (!TextUtils.isEmpty(item.text) || controller.edit) {
|
||||||
holder.container.setVisibility(View.VISIBLE);
|
holder.container.setVisibility(View.VISIBLE);
|
||||||
holder.text.setTextColor(Color.BLACK);
|
if (controller.getActivity() != null) {
|
||||||
|
holder.text.setTextColor(ContextCompat.getColor(
|
||||||
|
controller.getActivity(),
|
||||||
|
R.color.conversation_item_header)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (controller.edit &&
|
if (controller.edit &&
|
||||||
controller.editableFields.contains(item.field.toString().toLowerCase(Locale.ROOT))) {
|
controller.editableFields.contains(item.field.toString().toLowerCase(Locale.ROOT))) {
|
||||||
|
9
app/src/main/res/drawable-night/ic_contacts.xml
Normal file
9
app/src/main/res/drawable-night/ic_contacts.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="16"
|
||||||
|
android:viewportHeight="16">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="m9,1c-1.746,0 -3,1.43 -3,2.8 0,1.4 0.1,2.4 0.8,3.5 0.224,0.29 0.485,0.35 0.7,0.6 0.135,0.5 0.24,1 0.1,1.5 -0.436,0.153 -0.85,0.332 -1.27,0.5 -0.51,-0.273 -1.1,-0.5 -1.61,-0.7 -0.07,-0.28 -0.02,-0.487 0.05,-0.75 0.12,-0.125 0.23,-0.18 0.36,-0.3 0.37,-0.45 0.39,-1.21 0.39,-1.75 0,-0.8 -0.72,-1.4 -1.5,-1.4 -0.87,0 -1.5,0.72 -1.5,1.4h-0.02c0,0.7 0.05,1.2 0.4,1.75 0.1,0.15 0.242,0.175 0.35,0.3 0.0674,0.25 0.121,0.5 0.05,0.75 -0.64,0.223 -1.244,0.5 -1.8,0.8 -0.42,0.3 -0.233,0.182 -0.5,1.15 -0.124,0.5 1.3,0.73 2.32,0.81 -0.05,0.275 -0.12,0.64 -0.32,1.34 -0.32,1.25 4.353,1.7 6,1.7 2.43,0 6.313,-0.456 5.98,-1.7 -0.52,-1.94 -0.208,-1.71 -0.98,-2.3 -1.09,-0.654 -2.452,-1.167 -3.6,-1.6 -0.15,-0.557 -0.04,-0.97 0.1,-1.5 0.235,-0.25 0.5,-0.36 0.72,-0.6 0.69,-0.884 0.78,-2.424 0.78,-3.5 0,-1.586 -1.43,-2.8 -3,-2.8z" />
|
||||||
|
</vector>
|
9
app/src/main/res/drawable-night/ic_link.xml
Normal file
9
app/src/main/res/drawable-night/ic_link.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="16"
|
||||||
|
android:viewportHeight="16">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="m7.95,0.65c-4.1,0 -7.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.6 -1.2,-1.1 -0.3,-0.7 -1.1,-1.2 -1,-2.1 0,-0.4 0.2,-1 0.6,-1.1z" />
|
||||||
|
</vector>
|
25
app/src/main/res/drawable-night/ic_password.xml
Normal file
25
app/src/main/res/drawable-night/ic_password.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<!--
|
||||||
|
@author Google LLC
|
||||||
|
Copyright (C) 2018 Google LLC
|
||||||
|
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="16"
|
||||||
|
android:viewportHeight="16">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="m8,1c-2.319,0 -3.967,1.8644 -4,4v2.5h-1.5v7.5h11v-7.5h-1.5v-2.5c0,-2.27 -1.8,-3.9735 -4,-4zM8,3c1.25,0 2,0.963 2,2v2.5h-4v-2.5c0,-1.174 0.747,-2 2,-2z" />
|
||||||
|
</vector>
|
@ -29,7 +29,7 @@
|
|||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
android:layout_width="@dimen/iconized_single_line_item_icon_size"
|
android:layout_width="@dimen/iconized_single_line_item_icon_size"
|
||||||
android:layout_height="@dimen/iconized_single_line_item_icon_size"
|
android:layout_height="@dimen/iconized_single_line_item_icon_size"
|
||||||
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
|
android:layout_marginStart="@dimen/standard_margin"
|
||||||
android:contentDescription="@string/account_icon"
|
android:contentDescription="@string/account_icon"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@ -40,13 +40,12 @@
|
|||||||
android:id="@+id/user_info_edit_text"
|
android:id="@+id/user_info_edit_text"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
|
android:layout_marginStart="@dimen/standard_margin"
|
||||||
android:layout_marginEnd="@dimen/standard_margin"
|
android:layout_marginEnd="@dimen/standard_margin"
|
||||||
android:autofillHints="none"
|
android:autofillHints="none"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/scope"
|
app:layout_constraintEnd_toStartOf="@id/scope"
|
||||||
app:layout_constraintStart_toEndOf="@id/icon"
|
app:layout_constraintStart_toEndOf="@id/icon"
|
||||||
@ -58,8 +57,7 @@
|
|||||||
android:id="@+id/scope"
|
android:id="@+id/scope"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
|
android:layout_marginEnd="@dimen/standard_margin"
|
||||||
android:layout_marginEnd="@dimen/standard_double_margin"
|
|
||||||
android:contentDescription="@string/scope_toggle"
|
android:contentDescription="@string/scope_toggle"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
android:layout_width="@dimen/iconized_single_line_item_icon_size"
|
android:layout_width="@dimen/iconized_single_line_item_icon_size"
|
||||||
android:layout_height="@dimen/iconized_single_line_item_icon_size"
|
android:layout_height="@dimen/iconized_single_line_item_icon_size"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
|
android:layout_marginStart="@dimen/standard_margin"
|
||||||
app:corners="100" />
|
app:corners="100" />
|
||||||
|
|
||||||
<com.elyeproj.loaderviewlibrary.LoaderTextView
|
<com.elyeproj.loaderviewlibrary.LoaderTextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
|
android:layout_marginStart="@dimen/standard_margin"
|
||||||
android:layout_marginEnd="@dimen/standard_margin" />
|
android:layout_marginEnd="@dimen/standard_margin" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user