import android.text.TextWatcher;
import android.util.Log;
import android.util.TypedValue;
+import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
acc.setWidth(0);
final EditText amt = new EditText(this);
- amt.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT, 1f));
+ amt.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,
+ TableRow.LayoutParams.MATCH_PARENT, 1f));
amt.setHint(R.string.new_transaction_amount_hint);
amt.setWidth(0);
amt.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED | InputType.TYPE_NUMBER_FLAG_DECIMAL );
final TableRow row = new TableRow(this);
row.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT));
+ row.setGravity(Gravity.BOTTOM);
row.addView(acc);
row.addView(amt);
table.addView(row);
android:id="@+id/new_transaction_acc_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
android:layout_weight="9"
android:width="0dp"
android:hint="@string/new_transaction_account_hint"
android:nextFocusDown="@id/new_transaction_amt_1"
android:nextFocusForward="@id/new_transaction_amt_1"
- android:textColorLink="@android:color/background_light" />
+ android:text="This is a sample account name, deliberately long" />
<EditText
android:id="@+id/new_transaction_amt_1"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="bottom"
android:layout_weight="1"
android:width="0dp"
android:hint="@string/new_transaction_amount_hint"
android:id="@+id/new_transaction_acc_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
android:layout_weight="9"
android:width="0dp"
android:hint="@string/new_transaction_account_hint"
android:id="@+id/new_transaction_amt_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
android:layout_weight="1"
android:width="0dp"
android:hint="@string/new_transaction_amount_hint"