本文整理汇总了Java中android.widget.TableLayout.setTag方法的典型用法代码示例。如果您正苦于以下问题:Java TableLayout.setTag方法的具体用法?Java TableLayout.setTag怎么用?Java TableLayout.setTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.TableLayout
的用法示例。
在下文中一共展示了TableLayout.setTag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setOnClickListener
import android.widget.TableLayout; //导入方法依赖的package包/类
private void setOnClickListener(TableLayout mTableLayoutConnection, int position) {
mTableLayoutConnection.setTag(position);
View.OnClickListener onClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
int pos = (int) v.getTag();
PeerAppToApp peer = getItem(pos);
Intent intent = new Intent(context, TrustChainActivity.class);
intent.putExtra("PeerAppToApp", peer);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
};
mTableLayoutConnection.setOnClickListener(onClickListener);
}
示例2: insertList
import android.widget.TableLayout; //导入方法依赖的package包/类
public TableLayout insertList(int Index, boolean isOrdered, String text) {
TableLayout table = CreateTable();
editorCore.getParentView().addView(table, Index);
table.setTag(editorCore.createTag(isOrdered ? EditorType.ol : EditorType.ul));
AddListItem(table, isOrdered, text);
return table;
}
示例3: convertListToOrdered
import android.widget.TableLayout; //导入方法依赖的package包/类
public void convertListToOrdered(TableLayout _table) {
EditorControl type = editorCore.createTag(EditorType.ol);
_table.setTag(type);
for (int i = 0; i < _table.getChildCount(); i++) {
View _childRow = _table.getChildAt(i);
CustomEditText editText = (CustomEditText) _childRow.findViewById(R.id.txtText);
editText.setTag(editorCore.createTag(EditorType.OL_LI));
_childRow.setTag(editorCore.createTag(EditorType.OL_LI));
TextView _bullet = (TextView) _childRow.findViewById(R.id.lblOrder);
_bullet.setText(String.valueOf(i + 1) + ".");
}
}
示例4: convertListToUnordered
import android.widget.TableLayout; //导入方法依赖的package包/类
public void convertListToUnordered(TableLayout _table) {
EditorControl type = editorCore.createTag(EditorType.ul);
_table.setTag(type);
for (int i = 0; i < _table.getChildCount(); i++) {
View _childRow = _table.getChildAt(i);
CustomEditText _EditText = (CustomEditText) _childRow.findViewById(R.id.txtText);
_EditText.setTag(editorCore.createTag(EditorType.UL_LI));
_childRow.setTag(editorCore.createTag(EditorType.UL_LI));
TextView _bullet = (TextView) _childRow.findViewById(R.id.lblOrder);
_bullet.setText("•");
}
}