简
3年前
理解Android.bp
介绍Android最新的编译系统一、简介早期的Android系统都是采用Android.mk的配置来编译源码,从Android7.0开始引入Android.bp。很明显Android.bp的出现就是为了替换掉Android.mk。再来说一说跟着Android版本相应的发展演变过程:Android7.0引入ninja和kati
Stella981 Stella981
2年前
Android Jetpack 库架构组件 ViewModel+LiveData 基础使用
ViewModel是什么ViewModel类旨在以注重生命周期的方式存储和管理界面相关的数据。ViewModel类让数据可在发生屏幕旋转等配置更改后继续留存。为什么ViewModel类中的数据可在发生屏幕旋转等配置更改后继续留存?因为ViewModel的生命周期长于组件(Activi
Wesley13 Wesley13
2年前
360项目
shape资源创建图片(重点)1.resdrawablexxx.xml<shapexmlns:android"http://schemas.android.com/apk/res/android"android:shape"rectangle"
Stella981 Stella981
2年前
Android toolbar 标题精确居中 不会因返回键偏移
1\.总的布局文件<android.support.design.widget.CoordinatorLayoutxmlns:android"http://schemas.android.com/apk/res/android"xmlns:app"http://schemas.android.com
Stella981 Stella981
2年前
Android添加横线和竖线分割界面
竖线<View    android:layout\_width"1dip"    android:layout\_height"match\_parent"   android:background"66CCFF"   android:layout\_gravity"center\_horizontal"
Stella981 Stella981
2年前
Android控件ListView简易使用(使用ArrayAdapter)
<?xmlversion"1.0"encoding"utf8"?<TextViewxmlns:android"http://schemas.android.com/apk/res/android"android:id"@id/tv"android:la
Stella981 Stella981
2年前
Android 控件抖动效果
利用Android自带的动画效果,实现控件的抖动效果,效果资源文件shark.xml<?xmlversion"1.0"encoding"utf8"?<translatexmlns:android"http://schemas.android.com/apk/res/android"android:fr
Stella981 Stella981
2年前
Gallery实现流畅的新闻滚动 方法复写
package com.ename.views;import android.content.Context;import android.util.AttributeSet;import android.view.KeyEvent;import android.view.MotionEvent;
Stella981 Stella981
2年前
Android GridView 添加 HeadView
package com.example.test;import android.content.Context;import android.util.AttributeSet;import android.util.Log;import android.view.MotionEvent;i
Stella981 Stella981
2年前
Android图片处理工具类(持续积累补充)
package cn.mucang.android.community.utils;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.graphics.Matrix;impo