任务完不成了,马老师讲课诱惑力太大了
总结一下:
Andriod弹框可写方法建AlertDialog.Builder类,直接一个.setTitle("")语句添加标题,.setAdapter(adapter)添加列表,setPositiveButoon(builder);可写按键。
实例:
private AlertDialog.Builder setPositiveButoon(AlertDialog.Builder builder) {
return builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(MainActivity.this, "确定", Toast.LENGTH_SHORT).show();
}
});
}
private AlertDialog.Builder setNegativeButton(AlertDialog.Builder builder) {
return builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(MainActivity.this, "取消", Toast.LENGTH_SHORT).show();
}
});
}
public void simpleList(){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("蓝牙列表");
builder.setAdapter(myAdapter1,null);
setPositiveButoon(builder);
setNegativeButton(builder)
.create()
.show();
}
马老师的课学会了,状态机方法写按钮,释放CPU
中断使用过程中严格考虑CPU占用率,对于声音处理,了解到可以用“A率”这种非线性AD转换,降低声音失真
智能手环颇有收获,明白肌电传感器没办法精确识别手势 |