- 博客(28)
- 收藏
- 关注
转载 底部导航栏
一、导依赖compile 'com.hjm:BottomTabBar:1.1.1' 二、Xml布局中 <com.hjm.bottomtabbar.BottomTabBar android:id="@+id/bottom_tab_bar" android:layout_width="match_parent" android:layout_heig...
2018-08-28 20:25:26 229
转载 WebView
一、Xml中<<span style="color:#000080;font-weight:bold;">WebView android:id="@+id/mWebView" android:layout_width="match_parent" android:layout_height="wrap_content"></&am
2018-08-28 18:54:15 188
转载 视频播放器
一、Xml中<<span style="color:#000080;font-weight:bold;">VideoView android:id="@+id/mVideo" android:layout_width="match_parent"android:layout_height="match_parent" />二、Activity中pri
2018-08-28 18:53:58 187
转载 广播BroadCastReceiver
一、Xml中 <<span style="color:#000080;font-weight:bold;">Buttonandroid:id="@+id/mBtn1"android:text="有序广播"android:layout_width="match_parent"android:layout_height="wrap_content&
2018-08-28 18:53:44 145
转载 Menu菜单
一、Xml中<<span style="color:#000080;font-weight:bold;">android.support.v7.widget.Toolbar android:id="@+id/mToolbar" android:background="@color/colorPrimary" android:layout_width=...
2018-08-28 18:53:30 163
转载 沉浸式状态栏
一、在Acitvity中@Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if (hasFocus && Build.VERSION.SDK_INT >= 19) { View decorView = ge...
2018-08-28 18:53:16 156
转载 微信按钮的插件(快捷版)
一、导依赖compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'二、在Macitivity的Xml中复制即可,但有的地方会报红,报红后先提成到RelativeLayout中,而后CTRL、ALT+空格键,选择第一个! <<span style="color:#000080;font-weigh...
2018-08-28 18:53:03 616
转载 UML类图
https://www.cnblogs.com/sizaif/p/9078351.html 同款1.类(Class):使用三层矩形框表示。第一层显示类的名称,如果是抽象类,则就用斜体显示。第二层是字段和属性。第三层是类的方法。注意前面的符号,‘+’表示public,‘-’表示private,‘#’表示protected,#号可以省略不写。2.UML类图符号之接口:使用两层矩...
2018-08-28 18:52:45 953
转载 二级列表
一、Mactivity的Xml中<<span style="color:#000080;font-weight:bold;">ExpandableListViewandroid:id="@+id/mExpandableView"android:layout_width="match_parent"android:layout_height="wrap_content...
2018-08-13 17:07:42 152
转载 接口回调
接口传值 创建接口 public interface MyFace{//定义接口中的方法 void setItemClick(Student student); } 获取传送数据页面中 1实例化一个接口 public MyFace myFace; 2设置一个set方法获取需要传输的...
2018-08-13 17:07:31 129
转载 圆形图片一行代码实现
1.导依赖 compile 'com.github.bumptech.glide:glide:4.3.1' 2.添加网络权限 //一行代码直接实现 //注意的地方:ming改成自己的ImageView变量名 Glide.with(this).load(photo).apply(RequestOptions.bitmapTran...
2018-08-13 17:07:13 213
转载 音乐播放器Activity
private void initDianji() {myListAdapter = new MyListAdapter(mList, MainActivity.this);mListView.setAdapter(myListAdapter);mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {@Over...
2018-08-13 17:07:00 243
转载 节操视频播放器
一、添加类库compile 'cn.jzvd:jiaozivideoplayer:6.0.0'二、添加布局<<span class="pl-ent" style="box-sizing: border-box; outline: 0px; word-break: break-all; color: rgb(34, 134, 58);">cn.jzvd.JZVid...
2018-08-13 17:06:48 2273
转载 广播BroadCastReceiver
一、Xml中<<span style="color:#000080;font-weight:bold;">Buttonandroid:id="@+id/mBtn1"android:text="有序广播"android:layout_width="match_parent"android:layout_height="wrap_content" /&
2018-08-13 17:06:38 136
转载 PoPuPWindow使用
一、Xml中<<span style="color:#000080;font-weight:bold;">TextViewandroid:text="是否删除"android:layout_width="wrap_content"android:layout_height="wrap_content" /><<span style=
2018-08-13 17:06:28 133
转载 正则表达式
一、Xml布局中<<span style="color:#000080;font-weight:bold;">EditTextandroid:id="@+id/mEditText1"android:hint="请输入手机号或邮箱"android:layout_width="match_parent"android:layout_height="wrap_conte
2018-08-13 17:06:16 166
转载 动画
一、在drawable中创建animal<<span style="color:#000080;font-weight:bold;">set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="5000"><<span style="color:#
2018-08-13 17:06:05 146
转载 SeekBar进度条的使用
一、在Xml布局中<<span style="color:#000080;font-weight:bold;">SeekBarandroid:id="@+id/mSeekBar"android:layout_width="match_parent"android:layout_height="match_parent" />二、在Activity中
2018-08-13 17:05:53 752
转载 项目首页四个RadioButton的操作与显示
一、Xml文件中<<span style="color:#000080;font-weight:bold;">RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:t...
2018-08-10 16:11:23 338 2
转载 数据库增删改查
一、数据库代码 //1.通过DaoMaster获取DevSession对象 DaoSession daoSession = DaoMaster.newDevSession(this, BeanDao.TABLENAME); //2.通过DevSession获取Dao对象 beanDao = daoSession.getBeanDao();...
2018-08-10 16:11:12 171
转载 GET和POST
一、Post @FormUrlEncoded @POST("api/account/login")//使用rxjava+retrofit 发生变化的地方就是 返回值变成了observable rx.Observable login(@Field("phone") String phone, @Field("password") String psw); ...
2018-08-10 16:10:59 239
转载 数据库配置
1、在Project的build.gradle中配置classpathdependencies { classpath 'com.android.tools.build:gradle:3.0.0' classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin ...
2018-08-10 16:10:42 224
转载 Fragment复用、懒加载
一、xml 布局中1、Activity xml android:id="@+id/tablayout" android:layout_width="match_parent" android:layout_height="54dp" /> android:id="@+id/vp" a...
2018-08-10 16:10:30 285
转载 图片缩放
1、倒依赖compile 'com.github.chrisbanes.photoview:library:1.2.4' 2、一行代码搞定PhotoViewAttacher photoViewAttacher = new PhotoViewAttacher(mImageMnv);
2018-08-10 16:10:17 114
转载 Retrofit+RxJava+缓存
public class RetrofitUtils {private final Retrofit retrofit;private RetrofitUtils(){retrofit = new Retrofit.Builder().client(getOkHttpClient()).baseUrl("http://www.baidu.com/").addConverterFa...
2018-08-10 16:10:07 144
转载 SVG矢量图
1、导依赖 compile 'com.eftimoff:android-pathview:1.0.8@aar'2.布局xmlns:app="http://schemas.android.com/apk/res-auto" android:fitsSystemWindows="true"3、控件 PathView app:pat...
2018-08-10 16:09:56 398
转载 Fragment复用
首先我们要先定义两个值:private String [] aa = new String[]{"头条","科技","财经","军事"};private String [] bb = new String[]{"http://c.m.163.com/nc/article/headline/T1348647909107/0-20.html","http://c.m.163.com/nc/a.
2018-08-10 16:09:46 227
转载 QQ分享Intent隐示跳转
Intent intent = new Intent(Intent.ACTION_SEND);intent.setType("text/plain");intent.putExtra(Intent.EXTRA_SUBJECT, "分享");intent.putExtra(Intent.EXTRA_TEXT, "喜欢你傻傻的可爱");intent.setFlags(Intent.FL...
2018-08-10 16:09:32 989
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人