]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/profile_detail.xml
drop unneeded ems setting in several layouts
[mobile-ledger.git] / app / src / main / res / layout / profile_detail.xml
index f640f3e65b1234e1218235ae795486b56191f00b..9442604e8a2d62436c196dab2ff5f5d7cd64e9cf 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?><!--
-  ~ Copyright © 2019 Damyan Ivanov.
+  ~ Copyright © 2020 Damyan Ivanov.
   ~ This file is part of MoLe.
   ~ MoLe is free software: you can distribute it and/or modify it
   ~ under the term of the GNU General Public License as published by
@@ -36,7 +36,6 @@
             android:id="@+id/profile_name"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:ems="10"
             android:hint="@string/profile_name_label"
             android:inputType="textPersonName" />
     </com.google.android.material.textfield.TextInputLayout>
@@ -52,7 +51,6 @@
             android:id="@+id/url"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:ems="10"
             android:hint="@string/url_label"
             android:inputType="textUri"
             android:text="@string/pref_default_backend_url" />
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginBottom="@dimen/activity_vertical_margin"
-                android:background="@color/error_background"
+                android:background="?colorError"
                 android:padding="@dimen/activity_vertical_margin"
                 android:visibility="gone">
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:textColor="?colorOnError"
                     android:text="@string/insecure_scheme_with_auth" />
             </LinearLayout>
 
                     android:id="@+id/auth_user_name"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:ems="10"
                     android:hint="@string/pref_title_backend_auth_user"
                     android:inputType="textPersonName" />
             </com.google.android.material.textfield.TextInputLayout>
                     android:id="@+id/password"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:ems="10"
                     android:hint="@string/pref_title_backend_auth_password"
                     android:inputType="textWebPassword" />
 
             android:textAppearance="?android:textAppearanceListItem" />
 
         <LinearLayout
-            android:id="@+id/default_commodity_layout"
-            android:orientation="vertical"
+            android:id="@+id/posting_sub_items"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:clickable="true"
-            android:focusable="true"
-            android:layout_marginBottom="16dp">
+            android:orientation="vertical">
 
-            <TextView
+            <LinearLayout
+                android:id="@+id/default_commodity_layout"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/profile_default_commodity"
-                android:textAppearance="?android:textAppearanceListItem" />
+                android:layout_marginBottom="16dp"
+                android:clickable="true"
+                android:focusable="true"
+                android:orientation="vertical">
 
-            <TextView
-                android:id="@+id/default_commodity_text"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:textAppearanceListItemSecondary"
-                android:textColor="?attr/textColor"
-                android:text="@string/btn_no_currency"/>
-        </LinearLayout>
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="@string/profile_default_commodity"
+                    android:textAppearance="?android:textAppearanceListItem" />
 
-        <Switch
-            android:id="@+id/profile_show_commodity"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="16dp"
-            android:text="@string/currency_input_by_default"
-            android:textAppearance="?android:textAppearanceListItem"/>
+                <TextView
+                    android:id="@+id/default_commodity_text"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="@string/btn_no_currency"
+                    android:textAppearance="?android:textAppearanceListItemSecondary"
+                    android:textColor="?attr/textColor" />
+            </LinearLayout>
 
-        <LinearLayout
-            android:id="@+id/future_dates_layout"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="16dp"
-            android:orientation="vertical">
+            <Switch
+                android:id="@+id/profile_show_commodity"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="16dp"
+                android:text="@string/currency_input_by_default"
+                android:textAppearance="?android:textAppearanceListItem" />
 
-            <TextView
-                android:id="@+id/future_dates_title"
+            <Switch
+                android:id="@+id/profile_show_comments"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/profile_future_dates_label"
+                android:layout_marginBottom="16dp"
+                android:text="@string/show_comment_input_by_default"
                 android:textAppearance="?android:textAppearanceListItem" />
 
-            <TextView
-                android:id="@+id/future_dates_text"
+            <LinearLayout
+                android:id="@+id/future_dates_layout"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textAppearance="?android:textAppearanceListItemSecondary"
-                android:textColor="?attr/textColor" />
-        </LinearLayout>
+                android:layout_marginBottom="16dp"
+                android:orientation="vertical">
 
-        <com.google.android.material.textfield.TextInputLayout
-            android:id="@+id/preferred_accounts_accounts_filter_layout"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="16dp"
-            android:orientation="vertical">
+                <TextView
+                    android:id="@+id/future_dates_title"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="@string/profile_future_dates_label"
+                    android:textAppearance="?android:textAppearanceListItem" />
+
+                <TextView
+                    android:id="@+id/future_dates_text"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:textAppearanceListItemSecondary"
+                    android:textColor="?attr/textColor" />
+            </LinearLayout>
 
-            <com.google.android.material.textfield.TextInputEditText
-                android:id="@+id/preferred_accounts_filter_filter"
+            <com.google.android.material.textfield.TextInputLayout
+                android:id="@+id/preferred_accounts_accounts_filter_layout"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:ems="10"
-                android:fontFamily="monospace"
-                android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
-                android:inputType="text"
-                android:textColor="?attr/editTextColor" />
-        </com.google.android.material.textfield.TextInputLayout>
+                android:layout_marginBottom="16dp"
+                android:orientation="vertical">
+
+                <com.google.android.material.textfield.TextInputEditText
+                    android:id="@+id/preferred_accounts_filter_filter"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:fontFamily="monospace"
+                    android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
+                    android:inputType="text"
+                    android:textColor="?attr/editTextColor" />
+            </com.google.android.material.textfield.TextInputLayout>
+        </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
                 android:layout_weight="1"
                 android:background="?colorPrimary"
                 android:contentDescription="@string/btn_color_picker_button"
-                android:src="@drawable/ic_palette_black_24dp"
-                android:tint="?drawer_background" />
+                app:srcCompat="@drawable/ic_palette_black_24dp"
+                android:tint="?colorOnPrimarySurface"
+                />
 
         </LinearLayout>