Android - some basic control & resource operations
来源:互联网 发布:js if undefined 编辑:程序博客网 时间:2024/05/22 08:07
Android - some basic control & resource operations
- get control by resource id
(Button)findViewById(R.id.btnMtFaberLine);
- download population
dropdownDirection = (Spinner)findViewById(R.id.spinnerWelcome);String[] items = new String[]{"Entry","Exit"};ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, items);dropdownDirection.setAdapter(adapter);
- set textview text and bold
TextView textViewUserName = (TextView)findViewById(R.id.usernameTV);textViewUserName.setTypeface(null, Typeface.BOLD);textViewUserName.setText("User: " + username);
- image view operation
ImageView img1 = (ImageView) findViewById(R.id.imageView1);img1.setImageDrawable(null);img1.setImageResource(R.drawable.check);
- play audio
MediaPlayer mp = MediaPlayer.create(getApplicationContext(), R.raw.wrong);mp.start();
- format datetime
SimpleDateFormat dtFormater = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.ENGLISH);dtFormater.format(new Date());
1 0
- Android - some basic control & resource operations
- basic operations in sql
- Basic Query Operations
- VIM basic operations
- R dataframe basic operations
- basic file operations
- ioctl Socket Control Operations
- Some basic stuff
- Some basic javascript usage
- Some Basic GDI+ Objects
- Some basic socket functions
- some basic linux commands
- Some Basic SQL Queries
- some basic knowledge
- Some Basic Knowledge
- some basic interview question
- some resource favor
- hadoop hdfs2 Basic Filesystem Operations
- new scanner(system.in)超时问题
- Android - processing & processed message
- Codeforces Round #368 (Div. 2) D. Persistent Bookcase (离线+dfs)
- 我没有喜欢什么类型,我只喜欢你
- android sdk安装过程
- Android - some basic control & resource operations
- python中yield深入理解
- java反射
- Android - Start new Activity & Pass value
- java 8 LocalDateTime 20 例
- JZOJ4479【GDOI2016模拟4.26】游戏 线段树维护多条线段的信息
- C++内存管理
- ueditor的使用jsp版
- Android - usage of TextWatcher