当前位置: 首页>>代码示例>>Java>>正文


Java TableRow.setOnClickListener方法代码示例

本文整理汇总了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);
}
 
开发者ID:JUMA-IO,项目名称:BLE_Toolbox_Android,代码行数:21,代码来源:TRHActivity.java

示例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();
}
 
开发者ID:JUMA-IO,项目名称:BLE_Toolbox_Android,代码行数:20,代码来源:RBGActivity.java

示例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();
}
 
开发者ID:JUMA-IO,项目名称:BLE_Toolbox_Android,代码行数:19,代码来源:MagnetometerActivity.java

示例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);
}
 
开发者ID:JUMA-IO,项目名称:BLE_Toolbox_Android,代码行数:23,代码来源:CubeActivity.java

示例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();
}
 
开发者ID:JUMA-IO,项目名称:BLE_Toolbox_Android,代码行数:19,代码来源:OTAActivity.java

示例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();
	
}
 
开发者ID:JUMA-IO,项目名称:BLE_Toolbox_Android,代码行数:23,代码来源:BarometerActivity.java

示例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);
}
 
开发者ID:IrrilevantHappyLlamas,项目名称:Runnest,代码行数:31,代码来源:DisplayUserFragment.java

示例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);
    }
}
 
开发者ID:dingdingyr,项目名称:PullScrollView-,代码行数:35,代码来源:StretchViewActivity.java

示例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);
    }
}
 
开发者ID:dingdingyr,项目名称:PullScrollView-,代码行数:35,代码来源:PulldownViewActivity.java


注:本文中的android.widget.TableRow.setOnClickListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。