android 资源使用
来源:互联网 发布:php 获取视频预览图 编辑:程序博客网 时间:2024/06/07 05:59
下面是一些好的和不好的代码例子:
// Load a background for the current screen from a drawable resource.
this.getWindow().setBackgroundDrawableResource(R.drawable.my_background_image);
// WRONG Sending a string resource reference into a
// method that expects a string.
this.getWindow().setTitle(R.string.main_title);
// RIGHT Need to get the title from the Resources wrapper.
this.getWindow().setTitle(Resources.getText(R.string.main_title));
// Load a custom layout for the current screen.
setContentView(R.layout.main_screen);
// Set a slide in animation for a ViewFlipper object.
mFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
R.anim.hyperspace_in));
// Set the text on a TextView object.
TextView msgTextView = (TextView)findViewByID(R.id.msg);
msgTextView.setText(R.string.hello_message);
- Android之资源使用
- Android使用LayerDrawable资源
- Android使用其他资源
- Android当中使用资源
- Android - 使用资源(resource)
- Android 使用原始资源
- Android使用图片资源
- android 资源使用
- Android 使用主题资源
- Android资源使用规则
- android中的资源使用
- Android资源使用详解
- Android 资源的使用之XML资源
- Android资源 assets资源使用 raw
- Android Drawable资源的使用
- android怎样使用外部资源
- Android节省资源的使用.
- android视频项目使用资源
- Python Challenge 通关攻略
- LeetCode: Balanced Binary Tree
- 打印字符串所有字串
- 最长公共子串问题
- Android ContentProvider详解
- android 资源使用
- Eclipse Error: Failed To Create the Java Virtual Machine
- juce中的ComponentDragger
- 倒排文件索引(Inverted File Index)的建立
- PAT (Advanced) 1014. Waiting in Line (30)
- Navicat for MySQL 9.1.6 Enterprise 注册码:
- sql
- POJ 2387 Til the Cows Come Home
- eCharts使用图表简单示例