- 博客(5)
- 收藏
- 关注
原创 从activity跳转至fragment页面
在activity跳转中:Intent show = new Intent(当前Activity.this, HomePageActivity.class);//HomePageActivity目标fragmentshow.putExtra("fragid", 0);//参数0startActivity(show);finish();break;在fragment中接收传的
2016-11-09 15:24:39 663
原创 从fragment 跳转至activity
private void initialView() {RelativeLayout relative;relative = (RelativeLayout) messageLayout.findViewById(R.id.todo_list);relative.setOnClickListener(this);}public void onClick(View v
2016-11-09 15:21:20 229
原创 实现圆弧效果(放在res文件中)
实现圆弧效果(放在res文件中),在xml中引用即可 android:shape="rectangle" > android:angle="45" android:endColor="#CCCCCC" android:startColor="#CCCCCC" /> --
2016-11-09 15:16:12 179
原创 android 隐藏键盘的同时要显示edittext的光标
在开发过程中,使用自定义软键盘时要隐藏系统自带的键盘,但常规方法有一个弊端是隐藏键盘的同时会让EditText的光标消失,以下为解决方法(在Activity中):public void hide(View v){ InputMethodManager imm = (InputMethodManager) getSystemService(Context.
2016-11-09 15:11:24 326
原创 安卓实现固定横屏或竖屏
要实现固定横屏或竖屏,只需要在AndroidManifest.xml里声明Activity的时候加上以下2行: android:screenOrientation="landscape" //landscape为固定横屏,portrait为固定竖屏 android:configChanges="keyboardHidden|orientation"//是为了拦截旋屏和键盘切换事
2016-11-09 15:08:11 1553
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人