本文整理汇总了Java中android.widget.TableLayout.findViewById方法的典型用法代码示例。如果您正苦于以下问题:Java TableLayout.findViewById方法的具体用法?Java TableLayout.findViewById怎么用?Java TableLayout.findViewById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.TableLayout
的用法示例。
在下文中一共展示了TableLayout.findViewById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import android.widget.TableLayout; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.coin_layout, container, false);
if (Cache.topDivs == null || Cache.topDivs.equals("")) return rootView;
TableLayout tl = (TableLayout) rootView.findViewById(R.id.item_table);
try {
JSONObject obj = new JSONObject(Cache.bottomDivs);
Iterator<String> keys = obj.keys();
while (keys.hasNext()) {
String key = keys.next();
String market = key.split("-")[0];
if (!market.contains("btc")) continue;
String strType = key.split("-")[1];
TableLayout tlx = (TableLayout) inflater.inflate(R.layout.item_layout, container, false);
TextView level = (TextView) tlx.findViewById(R.id.level);
TextView reliability = (TextView) tlx.findViewById(R.id.reliability);
TextView time = (TextView) tlx.findViewById(R.id.div_time);
level.setText(strType);
reliability.setText(obj.getJSONObject(key).getDouble("reliability") + "");
time.setText(obj.getJSONObject(key).getString("cur_div_time"));
tl.addView(tlx);
}
} catch (JSONException e) {
e.printStackTrace();
}
return rootView;
}
示例2: initPinDigitButton
import android.widget.TableLayout; //导入方法依赖的package包/类
private void initPinDigitButton(final TableLayout keyboardLayout, final int buttonId, final int buttonValue) {
final Button pinButton = (Button) keyboardLayout.findViewById(buttonId);
pinButton.setOnClickListener(v -> onDigitKeyClicked(buttonValue));
}
示例3: initPinDeleteButton
import android.widget.TableLayout; //导入方法依赖的package包/类
private void initPinDeleteButton(final TableLayout keyboardLayout, final int buttonId) {
deleteButton = (ImageButton) keyboardLayout.findViewById(buttonId);
deleteButton.setOnClickListener(v -> onDeleteKeyClicked());
}