]> git.ktnx.net Git - mobile-ledger.git/commitdiff
NT: convert row to ConstraintLayout
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 23 Dec 2019 17:27:47 +0000 (19:27 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 23 Dec 2019 17:27:47 +0000 (19:27 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java
app/src/main/res/layout/new_transaction_row.xml

index 9ee32ea728f683ca307ba695c3716071ef441e38..e4d1d503d4ebc2ceb43d7a7fcdafb374b75495cf 100644 (file)
@@ -23,6 +23,7 @@ import android.text.Editable;
 import android.text.TextWatcher;
 import android.text.method.DigitsKeyListener;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.inputmethod.EditorInfo;
 import android.widget.AutoCompleteTextView;
 import android.widget.FrameLayout;
@@ -60,7 +61,7 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
     private AutoCompleteTextView tvAccount;
     private TextView tvAmount;
     private LinearLayout lHead;
-    private LinearLayout lAccount;
+    private ViewGroup lAccount;
     private FrameLayout lPadding;
     private MobileLedgerProfile mProfile;
     private Date date;
index 885adbe72458a0e15b8a2dd53c2beafb449b4cf6..9210b2980dcc795500beafea1558af791833728a 100644 (file)
             app:layout_constraintTop_toTopOf="parent" />
     </LinearLayout>
 
-    <LinearLayout
+    <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/ntr_account"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal">
 
-
         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
             android:id="@+id/account_row_acc_name"
             android:layout_width="0dp"
             android:hint="@string/new_transaction_account_hint"
             android:imeOptions="actionNext"
             android:inputType="text"
-            android:selectAllOnFocus="false" />
+            android:selectAllOnFocus="false"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
 
         <EditText
             android:id="@+id/account_row_acc_amounts"
             android:hint="@string/zero_amount"
             android:imeOptions="actionNext"
             android:inputType="numberSigned|numberDecimal|number"
-            android:minWidth="70sp"
+            android:minWidth="80sp"
             android:selectAllOnFocus="true"
-            android:textAlignment="viewEnd" />
+            android:textAlignment="viewEnd"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toBottomOf="@id/account_row_acc_name" />
 
-    </LinearLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
 
     <FrameLayout
         android:id="@+id/ntr_padding"