Make column shrink to fit within table.

This commit is contained in:
Brian Pellin committed 2009-11-22 20:59:42 -06:00
1 parent f9771e3cf1
commit 9e9fe6963b
2 files changed
+11 -2

No files matched your search

+8
View File
@@ -44,6 +44,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TableLayout;
import android.widget.TextView;
import android.widget.Toast;
@@ -68,6 +69,10 @@ public class EntryActivity extends LockCloseActivity {
public static final int NOTIFY_USERNAME = 1;
public static final int NOTIFY_PASSWORD = 2;
@SuppressWarnings("unused")
private static final int COL_LABEL = 0;
private static final int COL_DATA = 1;
public static void Launch(Activity act, PwEntry pw, int pos) {
Intent i = new Intent(act, EntryActivity.class);
@@ -112,6 +117,9 @@ public class EntryActivity extends LockCloseActivity {
View scroll = findViewById(R.id.entry_scroll);
scroll.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
TableLayout table = (TableLayout) findViewById(R.id.entry_table);
table.setColumnShrinkable(COL_DATA, true);
Button edit = (Button) findViewById(R.id.entry_edit);
edit.setOnClickListener(new View.OnClickListener() {