List of usage examples for android.widget TableLayout getContext
@ViewDebug.CapturedViewProperty public final Context getContext()
From source file:org.brandroid.openmanager.fragments.DialogHandler.java
private static void fillShortcutsTable(TableLayout table) { final Context context = table.getContext(); for (int sc : MenuUtils.getMenuShortcuts(context)) { TableRow tr = new TableRow(context); TextView tv1 = new TextView(context); tv1.setGravity(Gravity.RIGHT);/*from w ww.j a v a 2s.c om*/ tv1.setPadding(20, 0, 20, 0); char scc = (char) (sc + ('a' - KeyEvent.KEYCODE_A)); tv1.setText("" + scc); TextView tv2 = new TextView(context); MenuItem item = MenuUtils.getMenuShortcut(sc); tv2.setText(item.getTitle()); tr.addView(tv1); tr.addView(tv2); table.addView(tr); } }