摘要: 我是参考这篇文章 :https://www.jianshu.com/p/dbc7e81aead2 主要是布局分横竖屏 然后再java代码 Configuration cf = this.getResources().getConfiguration(); int ori = cf.orientati 阅读全文
posted @ 2020-01-10 09:47 九块 阅读(158) 评论(0) 推荐(0)
摘要: 首先recyclerview适配器继承自RecyclerView.Adapter 不是之前的那个public class MyDetailsAdapter extends RecyclerView.Adapter {//设置常量 //平台 private static final int LEFT 阅读全文
posted @ 2020-01-10 00:13 九块 阅读(775) 评论(0) 推荐(0)
摘要: 获取到的bitmap剪切为圆形 private Bitmap createCircleBitmap(Bitmap resource) { //获取图片的宽度 int width = resource.getWidth(); Paint paint = new Paint(); //设置抗锯齿 pai 阅读全文
posted @ 2020-01-09 23:39 九块 阅读(265) 评论(0) 推荐(0)
摘要: 首先布局 因为我这个是列表所以这只是一个item <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width= 阅读全文
posted @ 2020-01-09 23:37 九块 阅读(644) 评论(0) 推荐(0)
摘要: //请求显示数据 private void getdata() { //开启线程来发起网络请求 new Thread(new Runnable() { @Override public void run() { try { 添加一个json格式数据 MediaType JSON = MediaTyp 阅读全文
posted @ 2020-01-09 23:35 九块 阅读(10436) 评论(0) 推荐(0)
摘要: //最重要的就是加上这两个 主要作用 把获取到的图片地址转为url格式然后再转bitmap格式 private void displayImage(String imagePath) { BitmapFactory.Options options = new BitmapFactory.Option 阅读全文
posted @ 2020-01-09 23:34 九块 阅读(7654) 评论(0) 推荐(0)
摘要: 要跳转的页 (返回后要刷新的页) MyFeedbackModel myFeedbackModel = myFeedback.get(position); Intent intent = new Intent(FeedbackList.this, FeedbackDetails.class); int 阅读全文
posted @ 2020-01-09 23:15 九块 阅读(267) 评论(0) 推荐(0)
摘要: /** * 获取图标 bitmap * * @param context * Context.getExternalFilesDir(Environment.DIRECTORY_PICTURES)//android 10存储图片地址 */ public static synchronized Bit 阅读全文
posted @ 2020-01-09 23:13 九块 阅读(696) 评论(0) 推荐(0)
摘要: 第三方控件 :https://github.com/scwang90/SmartRefreshLayout 首先添加依赖 implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0' //布局 <com.scwang.smartr 阅读全文
posted @ 2020-01-09 23:12 九块 阅读(335) 评论(0) 推荐(0)
摘要: recyclerview item布局<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_wi 阅读全文
posted @ 2020-01-09 17:17 九块 阅读(714) 评论(0) 推荐(0)