本文整理匯總了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("•");
}
}