【Android】33,BAT大厂面试题整理

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:text=“RadioButton2” />

<RadioButton

android:id=“@+id/radioButton3”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:text=“RadioButton3” />

<CheckBox

android:id=“@+id/checkBox1”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:text=“CheckBox1” />

<CheckBox

android:id=“@+id/checkBox2”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:text=“CheckBox2” />

<CheckBox

android:id=“@+id/checkBox3”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:text=“CheckBox3” />

3.修改MainActivity。

public class MainActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener, View.OnClickListener, CompoundButton.OnCheckedChangeListener {

private Spinner spinner;

private Button button1;

private Button button2;

private RadioButton radioButton1;

private RadioButton radioButton2;

private RadioButton radioButton3;

private CheckBox checkBox1;

private CheckBox checkBox2;

private CheckBox checkBox3;

private String[] list= new String[]{“下拉选项1”,“下拉选项2”,“下拉选项3”,“下拉选项4”};

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

spinner = findViewById(R.id.spinner);

button1 = findViewById(R.id.button1);

button2 = findViewById(R.id.button2);

radioButton1 = findViewById(R.id.radioButton1);

radioButton2 = findViewById(R.id.radioButton2);

radioButton3 = findViewById(R.id.radioButton3);

checkBox1 = findViewById(R.id.checkBox1);

checkBox2 = findViewById(R.id.checkBox2);

checkBox3 = findViewById(R.id.checkBox3);

spinner.setOnItemSelectedListener(this);

button1.setOnClickListener(this);

button2.setOnClickListener(this);

radioButton1.setOnClickListener(this);

radioButton2.setOnClickListener(this);

radioButton3.setOnClickListener(this);

checkBox1.setOnCheckedChangeListener(this);

checkBox2.setOnCheckedChangeListener(this);

checkBox3.setOnCheckedChangeListener(this);

spinner.setAdapter(new ArrayAdapter(this,android.R.layout.simple_spinner_item,list));

}

@Override

public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {

Toast.makeText(this, “当前选中的是”+list[position], Toast.LENGTH_SHORT).show();

}

@Override

public void onNothingSelected(AdapterView<?> parent) {

}

@Override

public void onClick(View v) {

switch (v.getId()) {

case R.id.button1:

new DatePickerDialog(MainActivity.this, new DatePickerDialog.OnDateSetListener() {

@Override

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数初中级安卓工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新Android移动开发全套学习资料》送给大家,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
img
img
img
img

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频
如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注Android)
img

66063)]
[外链图片转存中…(img-lukJYnoh-1710930366063)]

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频
如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注Android)
[外链图片转存中…(img-lo2XbtjO-1710930366064)]

  • 8
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值