竹山一叶

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2017年5月24日

摘要: 1、onCreate()方法中最后判断需要保存的状态值if(savedInstanceState != null){ mCurrentIndex = savedInstanceState.getInt(KEY_INDEX,0); }2、在onCreate()方法后重写onSaveInstanceState(Budle)方法@Override public void onSaveInstan... 阅读全文
posted @ 2017-05-24 18:01 竹山一叶 阅读(2054) 评论(0) 推荐(0) 编辑

摘要: 通过代码来修改图片的大小:Drawable rightDrawable= context.getResources().getDrawable(R.drawable.more); rightDrawable.setBounds(0, 0, drawable.getIntrinsicWidth() / 2, drawable.getIntrinsicHeight() / 2) tvMore.setC... 阅读全文
posted @ 2017-05-24 15:32 竹山一叶 阅读(2341) 评论(0) 推荐(0) 编辑

摘要: http://www.xuebuyuan.com/558284.html方法一public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 隐藏标题栏... 阅读全文
posted @ 2017-05-24 13:49 竹山一叶 阅读(3668) 评论(0) 推荐(0) 编辑

摘要: 参考:http://stackoverflow.com/questions/33164886/android-textview-do-not-concatenate-text-displayed-with-settext 在Activity中对TextView进行动态更新显示数据时,如果使用:RGB_textview.setText(settingData.Image_R + "," + sett... 阅读全文
posted @ 2017-05-24 13:44 竹山一叶 阅读(1217) 评论(0) 推荐(0) 编辑

摘要: Android中 将 十六进制 颜色代码 转换为 int 类型数值 方法 : Color.parseColor("#00CCFF") 返回 int 数值来自为知笔记(Wiz) 阅读全文
posted @ 2017-05-24 11:28 竹山一叶 阅读(570) 评论(0) 推荐(0) 编辑