本文整理匯總了Java中android.widget.TableRow.setOnClickListener方法的典型用法代碼示例。如果您正苦於以下問題:Java TableRow.setOnClickListener方法的具體用法?Java TableRow.setOnClickListener怎麽用?Java TableRow.setOnClickListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.widget.TableRow
的用法示例。
在下文中一共展示了TableRow.setOnClickListener方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import android.widget.TableRow; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_trh);
sp = (Spinner)findViewById(R.id.spinner1);
tb = (TableRow)findViewById(R.id.tableRow1);
myView = (MyView)findViewById(R.id.mv);
wv = (WaveView)findViewById(R.id.wv);
tb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
onStop();
}
});
setSpinner();
wv.setWave(false,1.7f, 0.85f, 0.06f, 1,Color.argb(0x80, 0x36, 0xba, 0xf8), 0.5f);
}
示例2: onCreate
import android.widget.TableRow; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_rbg);
sp = (Spinner)findViewById(R.id.spinner1);
tb = (TableRow)findViewById(R.id.tableRow1);
myView = (ColorPicker) findViewById(R.id.colorPicker);
tb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
onStop();
}
});
setSpinner();
}
示例3: onCreate
import android.widget.TableRow; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_magnetometer);
sp = (Spinner)findViewById(R.id.spinner1);
iv1 = (ImageView)findViewById(R.id.imageView2);
tb = (TableRow)findViewById(R.id.tableRow1);
tb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
onStop();
}
});
b = BitmapFactory.decodeResource(getResources(), R.drawable.compass2);
setSpinner();
}
示例4: onCreate
import android.widget.TableRow; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.cube_activity);
sp = (Spinner)findViewById(R.id.spinner1);
setSpinner();
tb = (TableRow)findViewById(R.id.tableRow1);
tb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
onStop();
}
});
GLImage.load(this.getResources());
glView = new GLSurfaceView(this);
glView.setRenderer(render);
LinearLayout layout1 = (LinearLayout)findViewById(R.id.ddd);
layout1.addView(glView);
}
示例5: onCreate
import android.widget.TableRow; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_ota);
sp = (Spinner)findViewById(R.id.spinner1);
tb = (TableRow)findViewById(R.id.tableRow1);
ed = (EditText)findViewById(R.id.editText1);
tb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
onStop();
}
});
setSpinner();
}
示例6: onCreate
import android.widget.TableRow; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_barometer);
df = new DecimalFormat("######0.00");
sp = (Spinner)findViewById(R.id.spinner1);
tb = (TableRow)findViewById(R.id.tableRow1);
tp = (TextView)findViewById(R.id.tp);
tc = (TextView)findViewById(R.id.tc);
tm = (TextView)findViewById(R.id.tm);
tb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
onStop();
}
});
setSpinner();
}
示例7: displayFoundUser
import android.widget.TableRow; //導入方法依賴的package包/類
private void displayFoundUser(final View view, final String name, final String email) {
if (view == null || name == null || name.equals("")) {
throw new IllegalArgumentException();
}
TableLayout table = (TableLayout) view.findViewById(R.id.table);
TableRow tableRow = new TableRow(this.getContext());
//tableRow.setBackgroundColor(getResources().getColor(R.color.colorAccent));
tableRow.setPadding(20, 20, 20, 5);
TableRow.LayoutParams layoutParams = new TableRow.LayoutParams();
layoutParams.setMargins(50, 40, 40, 40);
TextView nameTextView = new TextView(this.getContext());
nameTextView.setText(name);
nameTextView.setTextSize(22);
nameTextView.setTextColor(getResources().getColor(R.color.cast_expanded_controller_text_color));
nameTextView.setLayoutParams(layoutParams);
tableRow.addView(nameTextView);
tableRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((SideBarActivity) getActivity()).searchViewAsMenuItem.collapseActionView();
listener.onDisplayProfileFragmentInteraction(name, email);
}
});
table.addView(tableRow);
}
示例8: showTable
import android.widget.TableRow; //導入方法依賴的package包/類
public void showTable() {
TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT,
TableRow.LayoutParams.WRAP_CONTENT);
layoutParams.gravity = Gravity.CENTER;
layoutParams.leftMargin = 30;
layoutParams.bottomMargin = 10;
layoutParams.topMargin = 10;
for (int i = 0; i < 40; i++) {
TableRow tableRow = new TableRow(this);
TextView textView = new TextView(this);
textView.setText("Test stretch scroll view " + i);
textView.setTextSize(20);
textView.setPadding(15, 15, 15, 15);
tableRow.addView(textView, layoutParams);
if (i % 2 != 0) {
tableRow.setBackgroundColor(Color.LTGRAY);
} else {
tableRow.setBackgroundColor(Color.WHITE);
}
final int n = i;
tableRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(StretchViewActivity.this, "Click item " + n, Toast.LENGTH_SHORT).show();
}
});
mMainLayout.addView(tableRow);
}
}
示例9: showTable
import android.widget.TableRow; //導入方法依賴的package包/類
public void showTable() {
TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT,
TableRow.LayoutParams.WRAP_CONTENT);
layoutParams.gravity = Gravity.CENTER;
layoutParams.leftMargin = 30;
layoutParams.bottomMargin = 10;
layoutParams.topMargin = 10;
for (int i = 0; i < 30; i++) {
TableRow tableRow = new TableRow(this);
TextView textView = new TextView(this);
textView.setText("Test pull down scroll view " + i);
textView.setTextSize(20);
textView.setPadding(15, 15, 15, 15);
tableRow.addView(textView, layoutParams);
if (i % 2 != 0) {
tableRow.setBackgroundColor(Color.LTGRAY);
} else {
tableRow.setBackgroundColor(Color.WHITE);
}
final int n = i;
tableRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(PulldownViewActivity.this, "Click item " + n, Toast.LENGTH_SHORT).show();
}
});
mMainLayout.addView(tableRow);
}
}