自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(68)
  • 收藏
  • 关注

原创 按钮点击切换页面

public class FirstActivity extends AppCompatActivity {private ViewPager Home_Frag;private RadioGroup Home_Gp;private FragmentManager mFragmentManager;private List mFragmentList = new ArrayList<...

2019-03-08 08:05:56 1284

原创 popwindow拍照

List stringList = new ArrayList();stringList.add(“拍照”);stringList.add(“从相册选择”); final OptionBottomDialog optionBottomDialog = new OptionBottomDialog(getActivity(), stringList); ...

2019-03-08 08:02:45 135

原创 greendao和流式布局的查询和清空搜索历史

先是权限classpath ‘org.greenrobot:greendao-gradle-plugin:3.2.2’apply plugin: ‘org.greenrobot.greendao’//GreenDao数据库implementation ‘org.greenrobot:greendao:3.2.2’//Butterknife:根据反射注入框架implementation ...

2019-03-07 23:40:00 238

原创 多条目展示

final List<Commodity.ResultBean.MlssBean.CommodityListBeanXX> commodityList= list.getCommodityList();holder.Ml_text.setText(commodityList.get(position).getCommodityName());holder.Ml_price.set...

2019-03-07 23:02:14 107

原创 Fresco的注册和缓存

public class MyApp extends Application {@Overridepublic void onCreate() {super.onCreate();//磁盘缓存的配置DiskCacheConfig diskCacheConfig = DiskCacheConfig.newBuilder(this).setBaseDirectoryPath(getCach...

2019-03-07 22:16:49 102

原创 相机相册裁剪

权限<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="18" />布局<ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height...

2019-03-07 22:11:12 112

原创 GreenDao的增删改查:

如果要修改greendao的路径,也就是要自定义greendao的路径:在在它自己的目录下添加:buildTypes {release {minifyEnabled falseproguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’}}//在第二个括号下添加这段代码gree...

2019-03-07 16:54:19 246

原创 RecyclerView的双层嵌套-购物车的代码:

依赖://Butterknife:根据反射注入框架implementation ‘com.jakewharton:butterknife:8.8.1’annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’//Brvah:RecyclerView快速开发框架implementation ‘com.github.Cym...

2019-03-07 14:56:34 401

原创 RecyclerView的双层嵌套-购物车的布局

显示activity_main的布局<android.support.v7.widget.RecyclerView android:id="@+id/frag_shop_first_rc" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weigh...

2019-03-07 14:43:18 476

转载 toobar

initToorBar();//获取布局管理器FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();frag_rm = new Frag_rm();frag_zz = new Frag_zz();transaction.add(R.id.framelay, frag_rm);tr...

2019-03-04 08:11:12 122

原创 侧拉的布局

<android.support.v4.widget.DrawerLayout xmlns:android=“http://schemas.android.com/apk/res/android”xmlns:app=“http://schemas.android.com/apk/res-auto”xmlns:tools=“http://schemas.android.com/tools”...

2019-02-26 07:57:42 125

原创 属性动画结束后跳转页面:

自定义View设置小圆点样式public class GuideView extends View {public GuideView(Context context) { super(context);}public GuideView(Context context, AttributeSet attrs) { super(context, attrs);}pu...

2019-01-20 13:45:12 294

原创 圆形搜索框和RecyclerView的线性,网格,瀑布切换

<SearchView圆形搜索的放大镜布局android:id="@+id/searchview"android:layout_width=“300dp”android:layout_height=“40dp”android:layout_marginRight=“20dp”android:background="@drawable/shape" />//引用shape//...

2019-01-20 12:05:10 232

原创 这个是XRecyclerView的多条目展示

XRecyclerView的多条目展示依赖:1 implementation ‘com.android.support:design:28.+’2 implementation ‘com.google.code.gson:gson:2.8.5’3 implementation ‘com.github.bumptech.glide:glide:4.8.0’4 implementat...

2019-01-19 20:54:39 192

原创 简单流式布局没有搜索哟

流式布局的依赖://流式布局依赖implementation ‘com.hyman:flowlayout-lib:1.1.2’/Picasso/implementation ‘com.squareup.picasso:picasso:2.3.2’流失布局的布局:1》:首先是activity_main中的布局:?xml version=“1.0” encoding=“utf-8”?&g...

2019-01-19 17:04:48 244

原创 生成二维码和扫一扫少量代码

AndroidManifet.xml 依赖//二维码implementation ‘com.android.support:design:28.0.0’implementation 'com.github.yuzhiqiang1993:zxing:2.1.4'生成二维码 case R.id.sheng:case R.id.sheng:String na...

2019-01-13 20:14:25 293

原创 自定义View《一 一》:圆形进度条到一百跳转页面

先导个依赖:androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’在drawable下建立一个文件:<corners android:radius="20dp" /><solid android:color="#d8d8d8"&

2019-01-06 20:00:44 186

原创 属性动画《一 一》

属性动画的依赖:1》implementation ‘com.jakewharton:butterknife:8.8.1’2》 annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’属性动画的res下的animator文件://动画从开始颜色到结束颜色的设置 //动画X轴平移//动画Y轴平移//动...

2019-01-06 19:51:30 123

原创 MVP中登录注册《三 三》OkHttpUtils

//网络请求页面public class OkHttpUtils {public OkHttpUtils() {}public OkHttpUtils get(String path) { OkHttpClient okHttpClient = new OkHttpClient(); final Request request = new Request.Builder()...

2019-01-01 23:22:23 116

原创 MVP中的登录注册《二 二》:登录页面 注册页面

//登录页面public class MainActivity extends AppCompatActivity implements View.OnClickListener, ILoginView {private EditText shou;private EditText mi;private Button denglu;private Button zhuce;privat...

2019-01-01 23:17:15 170

原创 MVP写登录注册《一 一》:MVP

先建一个类里面写上登录注册的接口public class API {//登录接口public static final String LOGIN_URL = “http://www.zhaoapi.cn/user/login”;//注册接口public static final String REG_URL = “http://www.zhaoapi.cn/user/reg”;}然后...

2019-01-01 23:10:55 116

原创 Okhttp里的内容

public class OkHttps {private OkHttpClient okHttpClient;private OkHttps() { //日志拦截器 HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); okHttpClient = new OkHttpCli...

2018-12-21 11:18:52 103

原创 所用的所有依赖《一》

1> implementation ‘com.squareup.okhttp3:logging-interceptor:3.4.1’2> implementation ‘com.squareup.okhttp3:okhttp:3.12.0’3> implementation ‘com.github.bumptech.glide:glide:4.8.0’4> imp...

2018-12-21 10:44:38 155

原创 git命令

$ cd 文件夹的名字$ git init$ git status$ git add$ git commit -am “第一个文件”$ git push 地址

2018-12-21 10:25:37 82

原创 有侧拉没有全选的购物车《二》:两个MyAdapater

//左侧的MyAdapaterpublic class LeftAdapter extends RecyclerView.Adapter<LeftAdapter.ViewHolder>implements View.OnClickListener {Context mContext;List<MyData.DataBean> data;public LeftAdap...

2018-12-20 21:20:36 91

原创 有侧拉没有全选的购物车《一》

右侧的布局right_item<ImageView android:id="@+id/right_image" android:layout_width="100dp" android:layout_height="100dp" /><LinearLayout android:layout_width="match_parent" a...

2018-12-20 21:19:04 91

原创 高德地图

高德地图的布局<com.amap.api.maps.MapView android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent"/>高德地图的依赖ndk {//设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的...

2018-12-20 21:14:11 151

原创 购物车的布局和实现《三》:MVP

public interface MyCallBack {//成功void setData(User data);//失败void setError(String error);}public interface Model {void getData(String mUrl, MyCallBack callBack);}public class ModelImpl implem...

2018-12-20 20:58:16 88

原创 购物车的布局和实现《二》:MyAdapter

public class MyAdapter extends BaseExpandableListAdapter {private ArrayList<User.DataBean> mList;private Context mContext;public MyAdapter(ArrayList<User.DataBean> mList, Context mConte...

2018-12-20 20:55:50 138 1

原创 购物车的布局和实现 《一》

//activity_main的布局<RelativeLayout android:id="@+id/bottom_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"&...

2018-12-20 20:54:33 193

原创 RecyclerView和XRecyclerView的布局和实现的MVP

//MyCallBack 的页面public interface MyCallBack {void setSuccess(MyData data);void setError(String error);}//Model页面void getData(String mUrl,int i, MyCallBack callBack);//和ModelImpl的页面public clas...

2018-12-20 20:47:40 136

原创 RecyclerView和XRecyclerView的布局和实现

需要导的依赖是:1》 implementation(‘com.jcodecraeer:xrecyclerview:1.5.9’) {exclude group: ‘com.android.support’}2》implementation ‘com.google.code.gson:gson:2.8.5’3》 implementation ‘com.squareup.okhttp3:o...

2018-12-20 20:43:23 629

转载 application权限加页面

public class MyApplication extends Application {@Overridepublic void onCreate() {super.onCreate();UMConfigure.init(this,“5a12384aa40fa3551f0001d1”,“umeng”,UMConfigure.DEVICE_TYPE_PHONE,"");Platfo...

2018-12-10 08:12:24 365

原创 第三方登录并分享

<Button android:id="@+id/QQ_Share" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="带面板分享" />&

2018-12-10 08:05:59 105

转载 beijing布局

<?xml version="1.0" encoding="utf-8"?><item android:state_checked="true" android:drawable="@color/a"></item><item android:drawable="@color/a1">&amp

2018-12-10 07:49:27 105

转载 activity布局mvp登录注册

<EditText android:id="@+id/shoujihao" android:layout_width="300dp" android:layout_height="50dp" android:layout_gravity="center_horizontal" android:textColorHint="#ADADAD" a..

2018-12-10 07:47:28 104

原创 fegament2:退出按钮点击事件

public class TwoFragment extends Fragment {private ImageView img;private Object CodeCreator;private Button but1;private SharedPreferences.Editor editor;@Overridepublic View onCreateView(LayoutI...

2018-12-09 21:12:26 143

原创 Xlistview的条目展示和上拉加载下拉刷新

public class OneFragment extends Fragment implements XView,XListView.IXListViewListener {private String mUrl = "http://api.expoon.com/AppNews/getNewsList/type/1/p/";private XListView xListView;priv...

2018-12-09 21:11:42 115

原创 主页面viewpager和radiobutton的按钮fragment切换

public class Main2Activity extends AppCompatActivity {private RadioGroup rg;private ViewPager vp;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState...

2018-12-09 21:10:28 150

原创 07的登录注册跳转:MainActivity

public class MainActivity extends BaseActivity implements IView {private String mUrl ="http://120.27.23.105/user/login";private PresenterImpl presenter;private Button login;private EditText shouji...

2018-12-09 21:09:34 202

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除