编辑框中加图片代码如下: mSubjectDetailView = (TextView) findViewById(R.id.subject_detail); CharSequence text = "如图所示★,dsfdsfdddd,如果fdsfs★东东...
分类:
移动开发 时间:
2015-01-07 10:37:55
阅读次数:
165
先看一下调整前后的效果图:
// Layout AllApps
AppsCustomizeTabHost host = (AppsCustomizeTabHost)
launcher.findViewById(R.id.apps_customize_pane);
if (host != null) ...
分类:
移动开发 时间:
2015-01-06 10:07:57
阅读次数:
658
AndroidAnnotation是一个通过Annotation对代码进行预处理,简化Android开发,加快开发速度,提高代码可阅读性的一个框架。它的主要思路是:用编译时Annotation对代码进行标记,通过Java的Annotation Processing对代码进行预处理,补齐代码。如FindViewById这样重复被使用的代码,可以通过在类成员上加上@ViewById(R.id.xxx)...
分类:
移动开发 时间:
2015-01-05 16:44:14
阅读次数:
142
public void OnMySelfClick(View v) { final TextView text = (TextView) findViewById(R.id.textView1); text.set...
分类:
其他好文 时间:
2015-01-04 14:56:53
阅读次数:
174
最近做一个项目,混合了NativeCode 和 HTML,为了便于JS 调用App的一些方法,统一封装一个Js方法,记录如下Android 端首先要再WebView中允许JS的调用WebView myWebView = (WebView) findViewById(R.id.webview);Web...
分类:
移动开发 时间:
2014-12-30 21:55:41
阅读次数:
243
以LinearLayout中的控件ImageView为例LinearLayout layout = (LinearLayout) convertView.findViewById(R.id.linearlayout); ImageView imageView = new ImageView(thi....
分类:
移动开发 时间:
2014-12-30 20:30:07
阅读次数:
302
调用代码:SmartImageView siv = (SmartImageView) findViewById(R.id.siv);siv.setImageUrl(et_path.getText().toString().trim(),R.drawable.iclaunch,R.drawable.i...
分类:
移动开发 时间:
2014-12-28 23:41:43
阅读次数:
198
最近做的一个登录对话框,在获取数据的时候出现错误,运行的时候自动死机。出错语句:EditText PasswordEidtText = (EditText)findViewById(R.id.UserPasswordEidtText); // 发送文本 String mes...
分类:
移动开发 时间:
2014-12-27 00:07:21
阅读次数:
254
RatingBar,SeekBar和ProgressBar的子类1 RatingBar事件处理 1 public void showRatingBar() { 2 3 ratingBar = (RatingBar) findViewById(R.id.ratingBar1); 4 ...
分类:
其他好文 时间:
2014-12-26 06:13:27
阅读次数:
239
SeekBar拖动条,是Progress的间接子类1 SeekBar事件,被拉动时,onProgressChanged会一直被触发 1 public void showSeekBar() { 2 seekBar = (SeekBar) findViewById(R.id.seekBa...
分类:
其他好文 时间:
2014-12-26 06:12:34
阅读次数:
265