
android
O_OMing
嘴角微微扬起不知是自嘲还是微笑。
展开
-
解决Recyclerview做聊天界面时被键盘遮挡问题
//进入界面时加载mRecyclerview时 mRecyclerview.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { ..原创 2021-02-23 14:28:58 · 285 阅读 · 0 评论 -
VideoView 播 放PTTHS信任所有证书
public class MyVideoView extends VideoView { public MyVideoView(Context context) { super(context); } public MyVideoView(Context context, AttributeSet attrs) { super(context, attrs); } public MyVideoView(Context conte.原创 2021-02-20 11:42:32 · 385 阅读 · 0 评论 -
退出APP
public class Carson_BaseApplicaiton extends Application { // 此处采用 LinkedList作为容器,增删速度快 public static LinkedList<Activity> activityLinkedList; @Override public void onCreate() { super.onCreate(); activityLinkedList ...转载 2021-01-28 15:19:14 · 258 阅读 · 0 评论 -
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
Android studio项目依赖项冲突解决方法:项目依赖项冲突会报如下错误:Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resol...转载 2018-06-03 20:33:39 · 258 阅读 · 0 评论 -
内存加载图片压缩 BitmapFactory.Options
/** *imgUrl 要压缩的力图片地址 **/ public Bitmap CompressedImage(String imgUrl) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; //为true时只加载图片的宽高,不原创 2017-12-04 18:03:06 · 461 阅读 · 0 评论 -
onTouch里的getX()和getRawX()的区别
getX()是读取以View左上角为(0,0),所取的点的X的坐标; getRawX()是读取以屏幕左上角为(0,0),所取的点的X的坐标;原创 2017-09-04 16:33:35 · 447 阅读 · 0 评论 -
二排RadioGroup单选实现
xml version="1.0" encoding="utf-8"?> xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation原创 2017-02-08 15:36:32 · 450 阅读 · 0 评论 -
沉浸式状态栏
透明状态栏 if (Build.VERSION.SDK_INT >= 21) { View decorView = getWindow().getDecorView(); int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;转载 2016-11-23 15:06:33 · 294 阅读 · 0 评论