- 博客(11)
- 收藏
- 关注
原创 亲测沉浸式状态栏
在Activity中添加以下代码//在setContentView(getLayout()); 之前 添加requestWindowFeature(Window.FEATURE_NO_TITLE);之后添加 //沉浸式代码配置 //当FitsSystemWindows设置 true 时,会在屏幕最上方预留出状态栏高度的 padding StatusBarUtil...
2019-06-28 11:45:54 125
翻译 Android开发之监听软键盘状态
public class KeyboardStateObserver { private static final String TAG = KeyboardStateObserver.class.getSimpleName(); public static KeyboardStateObserver getKeyboardStateObserver(Activity acti...
2019-06-28 11:32:42 413
翻译 解决android 软键盘在全屏下设置adjustResize无效的问题
使用方法在你的Activity的oncreate()方法里调用AndroidBug5497Workaround.assistActivity(this);即可。注意:在setContentView(R.layout.xxx)之后调用。//Workaround to get adjustResize functionality for input methos when the fullscr...
2019-06-28 11:31:19 483
原创 自定义圆环进度条
自定义View, 慢慢研究public class AnswerChartView extends View{ // 圆画笔 private Paint mCirclePaint; // 圆环画笔 private Paint mRingPaint; private Paint mRingPaint1; private Paint mRingP...
2018-09-03 11:25:00 294
原创 Recyclerview嵌套Recyclerview实现简单购物车
//里边的recyclerview的适配器 将CheckBox赋初始值if(childbeanlist.get(position).isCheck()){ setCheck.onCheck(); setPrice.setprice(); holder.child_checkbox.setChecked(true);}else{ holder.child_
2017-10-26 08:12:39 639
翻译 上传头像
public void head(){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("设置头像"); String[] items = { "选择本地照片", "拍照" }; builder.setNegativeButton("取消", null);
2017-10-15 20:08:01 255
原创 Xlistview实现多条目布局
------------定义final常量--------------public int sum=2;public final int atype=0;public final int btype=1;---------Adapter 里多实现两个方法-----------@Overridepublic int getItemViewType(int position
2017-08-23 15:39:27 342
原创 广播实时监听网络状态
//清单文件配置receiver android:name=".MainActivity$ReceiverJt"/>//MainActivity动态注册private ReceiverJt receiverJt;receiverJt = new ReceiverJt();//动态注册registerReceiver(receiverJt, new IntentFil
2017-08-23 11:28:46 304
原创 viewpager加小圆点及各种问题
-----------------添加小圆点-------------------private List ivlist;ivlist = new ArrayList<>();for (int i = 0; i imgs.length; i++) { ImageView iv=new ImageView(getContext()); if(i==0){ iv.
2017-08-18 20:27:50 394
原创 判断网络连接
public boolean isNetworkConnected(Context context) { if (context != null) { ConnectivityManager mConnectivityManager = (ConnectivityManager) context .getSystemService(Conte
2017-08-18 20:21:27 189
翻译 ImageLoader初始化详解
--------------- ImageLoaderConfiguration配置----------------------private static ImageLoaderConfiguration config;config = new ImageLoaderConfiguration.Builder(context)// 开始构建 ,图片加载配置.threadP
2017-08-15 10:12:32 522
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人