摘要:
mStartSnapHelper.attachToRecyclerView(mRecyclerViewMovie);mStartSnapHelper.setPageListener(this);mRecyclerViewMovie.setLayoutManager(mVLinearLayoutMan 阅读全文
摘要:
Glide.with(mContext) .asBitmap() .load(imageUrl) .apply(options) //.into(mImageView); .into(mTarget);下面在获取到下载图片尺寸信息后,基于图片宽高比,设置imageview宽高,给imageview 阅读全文
摘要:
我们经常会用到 HandlerThread 在线程中执行Runnable方法,调用代码如下, private HandlerThread mHandlerThread = new HandlerThread("MainActivity");mHandlerThread.start(); mWorkH 阅读全文
摘要:
1. TabLayout 设置 指示条 颜色、高度,字体颜色大小等 <android.support.design.widget.TabLayout android:id="@+id/tab_layout" android:layout_width="wrap_content" android:la 阅读全文
摘要:
public Point getScreenSize(Context context) { Point point = new Point(); WindowManager windowManager = (WindowManager) context.getSystemService( Conte 阅读全文
摘要:
public class NotificationUtil { private static final String TAG = AppConstants.APP_TAG + "NotificationUtil "; private static volatile NotificationUtil 阅读全文
摘要:
一、创建通用 RecyclerView.Adapter public class CommonAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private static final String TAG = AppCo 阅读全文
摘要:
在build.gradle文件中,如下配置可以使用工具生成file -project struct,注:更改后一定要clean一下,否则可能修改签名文件不生效 android { signingConfigs { release { storeFile file('../keystore/签名.jk 阅读全文
摘要:
一、创建通知栏布局文件 view_notification_layout.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/navigation_list_ite 阅读全文
摘要:
一.生命周期不同,销毁方式不同1.startService onCreate->onStartCommand 通过调用stopService 停止服务,否则一直后台运行->onDestroy()2.bindService onCreate->onBind调用者调用unbindService方法或者调 阅读全文