日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

matlab radiogroup,RadioGroup和CheckBox的使用 | 学步园

發(fā)布時間:2025/3/19 循环神经网络 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlab radiogroup,RadioGroup和CheckBox的使用 | 学步园 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.布局文件:

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical" >

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/hello" />

android:layout_width="fill_parent"

android:layout_height="wrap_content">

android:id="@+id/male"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/male"/>

android:id="@+id/female"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/female"/>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/swim"/>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/basket"/>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/foot"/>

2.RadioAndCheckBox.java

package wei.cao.Android;

import android.app.Activity;

import android.os.Bundle;

import android.widget.CheckBox;

import android.widget.CompoundButton;

import android.widget.RadioButton;

import android.widget.RadioGroup;

import android.widget.Toast;

public class RadioAndCheckBox extends Activity {

private RadioGroup genderGroup=null;

private RadioButton femaleButton=null;

private RadioButton maleButton=null;

private CheckBox swimBox=null;

private CheckBox basketBox=null;

private CheckBox footBox=null;

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

genderGroup=(RadioGroup)this.findViewById(R.id.genderGroup);

femaleButton=(RadioButton)this.findViewById(R.id.female);

maleButton=(RadioButton)this.findViewById(R.id.male);

swimBox=(CheckBox)this.findViewById(R.id.swim);

basketBox=(CheckBox)this.findViewById(R.id.basket);

footBox=(CheckBox)this.findViewById(R.id.foot);

genderGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener(){

public void onCheckedChanged(RadioGroup group, int checkedId) {

// TODO Auto-generated method stub

if(femaleButton.getId()==checkedId)

{

Toast.makeText(RadioAndCheckBox.this, "female",Toast.LENGTH_SHORT).show();

}

else if(maleButton.getId()==checkedId)

{

Toast.makeText(RadioAndCheckBox.this, "male",Toast.LENGTH_SHORT).show();

}

}

});

swimBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){

public void onCheckedChanged(CompoundButton buttonView,

boolean isChecked) {

// TODO Auto-generated method stub

if(isChecked)

{

System.out.println("swim is checked");

}

}

});

basketBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){

public void onCheckedChanged(CompoundButton buttonView,

boolean isChecked) {

if(isChecked)

{

System.out.println("basketBox is checked");

}

}

});

footBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){

public void onCheckedChanged(CompoundButton buttonView,

boolean isChecked) {

if(isChecked)

{

System.out.println("footBox is checked");

}

}

});

}

}

總結

以上是生活随笔為你收集整理的matlab radiogroup,RadioGroup和CheckBox的使用 | 学步园的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。