- 博客(12)
- 收藏
- 关注
原创 room数据库的使用
SearchView一个类似百度搜索框关键字搜索效果的实现 https://blog.csdn.net/qq_42177292/article/details/81158423 Room数据库详实使用指北(附Demo) https://blog.csdn.net/langlitaojin/article/details/88400659 https://blog.csdn.net/chenrenxiang/article/details/84067783 https://zhuanlan.zhihu.com
2021-09-01 23:05:17 830
原创 从下往上的动画
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#DDE2E3" tools:con
2021-08-26 22:42:28 236
原创 自定义banner
public class MyPagerAdapter extends PagerAdapter { private Context context; //图片的Id private List<Integer> datas; public MyPagerAdapter(Context context, List<Integer> datas) { this.context = context; this.datas =
2021-08-23 22:24:27 150
原创 动态权限获取
//检查权限 public void checkPermission() { int targetSdkVersion = 0; String[] PermissionString={Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO,Manifest.permission.ACC
2021-08-16 22:43:20 242
原创 android初学:tablayout+framelayout
public class MainActivity extends AppCompatActivity { @BindView(R.id.tablayout) TabLayout tablayout; private Unbinder unbinder; private SyFragment syFragment = new SyFragment(); private WdFragment wdFragment = new WdFragment(); private QtFragment qtFragm
2021-08-16 22:23:54 435
原创 自定义搜索框+属性
1、创建布局 2、自定义view引用布局 public class HeadView extends RelativeLayout { private EditText editText; public HeadView(Context context) { super(context, null); } public HeadView(Context context, AttributeSet attrs) { super(contex
2021-04-22 20:17:13 202
原创 viewpager+fragment+radiogroup的懒加载
radiogroup public class MainActivity extends AppCompatActivity { private ViewPager viewPager; private List<Fragment> list; private RadioGroup radioGroup; private FragMentA fragMentA; private FragMentB fragMentB; private Frag
2021-04-21 09:41:56 196
原创 导航栏布局
tablayout+viewpager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val titles = arrayListOf("放映","推荐") var list = mutableListOf<Fragment>
2021-04-14 20:03:50 168
原创 初学android:Android之Bitmap图片的二次采样
public class ImageUtils { //TODO 1, 单例 private static ImageUtils imageUtils = null; private ImageUtils(){} public static ImageUtils getImageUtils() { if(imageUtils == null){ imageUtils = new ImageUtils(); }
2021-03-16 16:22:24 163
原创 二维码相关
1、扫描二维码 //打开默认的扫码页面 public void openQrCodeActivity(View view) { Intent intent = new Intent(MainActivity.this, CaptureActivity.class); startActivityForResult(intent,100); } //重新该方法接收扫码之后的结果 @Override protected void onAct
2021-03-09 18:56:18 106
原创 Android多渠道打包--友盟
/1.在AndroidManifest.xml中application标签内添加如下/ </meta-data android:name="UMENG_CHANNEL" android:value="${UMENG_CHANNEL_VALUE}"/> /2.在module的build.gradle中添加渠道信息/ productFlavors{ wandoujia{} xiaomi{} yingyongbao {} //注意 360:gradle 中不能以数字开头 _360{} } produ
2021-03-09 16:22:51 121
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人