自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ExpandableListview购物车

一、ViewPage:1.xml <android.support.v4.view.ViewPager android:id="@+id/pager" android:layout_weight="1" android:layout_width="match_parent" andr...

2019-04-06 19:04:01 169

原创 动态权限

//权限的数组private static String[] PERMISSIONS_STORAGE = {//读取内存权限 Manifest.permission.READ_EXTERNAL_STORAGE,//写入内存权限 Manifest.permission.WRITE_EXTERNAL_STORAGE};private static int R...

2019-04-06 15:58:22 149

转载 Umeng第三方

1.需要的权限//必须的权限&lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;!-- 必须的权限 --&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; ...

2019-03-08 12:03:59 159

原创 MVp

1、modelinterface: public interface ModelInter { void getData(String url); void getList(String url); }class: public class ModelBase implements ModelInter{ ...

2019-03-08 10:09:41 134

原创 Ok封装

//拦截器 private static Interceptor getAppInterceptor(){ Interceptor interceptor = new Interceptor() { @Override public Response intercept(Chain chain) throws IOExcep...

2019-03-08 10:07:53 159

原创 二级列表购物车

1.获取数据来Log.i("data",""+data.toString());MyGroupAdapter myGroupAdapter = new MyGroupAdapter(this,data);//在适配器写入传值的方法传入IdmyGroupAdapter.setSelectAll(checkAll);myGroupAdapter.setView(sum);myGro...

2019-03-08 09:45:36 140

原创 球形图片滑动

//建一个类public class CirclePoint { private float positionX; private float positionY; private float raduis=100; public float getPositionX() { return positionX; } pu...

2019-03-06 14:36:44 149

原创 JS交互

//布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com...

2019-03-03 20:55:32 105

原创 EventBus

//传入需要传的值EventBus.getDefault().post(result.get(i).getId());//接受的类要注册EventBus.getDefault().register(OneFragment.this);//接收值的类或fragment写一个收值的方法@Subscribepublic void getmasg(String ...

2019-03-03 20:12:51 90

原创 WebView于JS交互

webview.loadDataWithBaseURL(null, infoBean.getResult().getDetails(), "text/html", "utf-8", null);webview.setWebViewClient(new WebViewClient());WebSettings settings = webview.getSettings();settings...

2019-03-01 17:09:24 108

原创 Tablayout

tabLayout = findViewById(R.id.xiang_Tab);viewPager = findViewById(R.id.pager);arrayList = new ArrayList&lt;&gt;();TabFragment tabFragment = new TabFragment();TabTwoFragment tabTwoFragment = new ...

2019-03-01 17:08:23 87

原创 简单ViewGroup实现页面

//布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools=...

2019-02-25 13:45:51 131

原创 XrecycleView上拉加载下拉刷新

//依赖implementation 'com.jcodecraeer:xrecyclerview:1.3.2'//glrade中加入configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -&gt; def requested = d...

2019-02-25 13:42:03 408

原创 自定义View实现搜索历史记录

//搜索布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="hori

2019-02-24 19:55:37 373

原创 自定义View实现横,纵,斜向视图

public fhyxk(Context context) { this(context,null); } public fhyxk(Context context, AttributeSet attrs) { this(context, attrs,0); } public fhyxk(Context context, Attr...

2019-02-22 15:08:03 143

原创 自定义View圆形头像

public class CircleView extends android.support.v7.widget.AppCompatImageView { private int radius; public CircleView(Context context) { super(context); } public CircleView(Con...

2019-02-20 18:54:18 253

原创 滑动条目动画

final MyAdapter myAdapter = new MyAdapter(this, dataX); AlphaInAnimationAdapter alphaInAnimationAdapter = new AlphaInAnimationAdapter(myAdapter); alphaInAnimationAdapter.setInterp...

2019-02-20 09:31:03 145

原创 flowlayout的简单实用

//依赖implementation 'com.hyman:flowlayout-lib:1.1.2'  // View inflate = inflater.inflate(R.layout.fragment_twok, container, false); flow = inflate.findViewById(R.id.flow); for (int...

2019-01-20 10:09:25 548

原创 截取图片以及替换https

Glide.with(context).load(list.get(i).getImages().split("\\|")[0].replace("https","http")).into(viewHolder.imageviewitem);

2019-01-20 09:56:12 242

原创 自定义View及加减View类

public class custom extends RelativeLayout implements View.OnClickListener { List&lt;CarBean.DataBean.ListBean&gt; list; GoodsAdapter goodsAdapter; private Button remove; private Butt...

2019-01-20 09:54:35 154

原创 购物车实现加减和全选

//自定义view加减实现public class customview extends RelativeLayout implements View.OnClickListener { private Button addo; private Button removeo; private TextView textview; private Integ...

2019-01-19 20:43:57 476 3

原创 firt

11111111111new Thread() { public void run() { runOnUiThread(new Runnable(){ @Override public void run() { //更新UI Gson gson=new G...

2019-01-13 20:16:50 182

原创 全局捕获异常

//新建一个CrasHandler雷并实现Thread.UncaughtExceptionHandlerpublic class CrashHandler implements Thread.UncaughtExceptionHandler{ private static CrashHandler crashHandler = new CrashHandler(); priv...

2019-01-13 19:14:36 209

原创 二维码

//布局&lt;ImageView android:id="@+id/erweima" android:layout_width="200dp" android:layout_height="200dp" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" andro..

2019-01-13 19:13:01 210

原创 mvp登录和注册

//Model接口中的方法public interface ModelInter { void getdata(String url,String name,String pass,LoginCallback loginCallback); public interface LoginCallback{ void onstatu(String data);...

2019-01-13 19:09:59 153

原创 Okhttp3

public class OkHttp { private static OkHttpClient okHttpClient; private static volatile OkHttp instance;//拦截器 private Interceptor getAppInterceptor(){ Interceptor interceptor = ...

2019-01-13 19:06:47 98

原创 R文件资源找不到,报错

R文件报错,导致整个项目报红,清理工程,重新编译都不能解决,下面两种方法不能解决  Clean Project Rebuild Project  打开Android Studio菜单的Help然后点击Edit Custom Properties再写入# custom Android Studio propertiesidea.max.intellis...

2019-01-09 16:03:41 925

原创 BottomTopBar

botab = findViewById(R.id.bottomTab); botab.init(getSupportFragmentManager()).setImgSize(50,50) .setFontSize(10) .setTabPadding(4,6,10)// .se...

2019-01-06 19:48:27 144

原创 自定义动画

 ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(viewById, "translationY",viewById.getTranslationY(), 800);        ObjectAnimator objectAnimator1= ObjectAnimator.ofFloat(viewById,"rotation",0,...

2019-01-06 19:37:12 148 1

原创 RecyView及Adapter

LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); linearLayoutManager.setOrientation(OrientationHelper.VERTICAL); GridLayoutManager gridLayoutM...

2019-01-06 19:06:53 225

原创 拦截器

//拦截器 private Interceptor getAppInterceptor(){ Interceptor interceptor = new Interceptor() { @Override public Response intercept(Chain chain) throws IO...

2019-01-06 19:01:04 102

原创 自定义TopBar

public class TopBar extends RelativeLayout { private Button left; private final Button right; private final TextView text; setLeftAndRightButton listenr; private SearchView serc...

2019-01-06 19:00:06 130

原创 mvp模式

 //model接口public interface ModelInter { void login(String url,String name,String pass); void modelList(String ListData);}//Model类public class ModelBase implements ModelInter {...

2019-01-02 08:28:55 85

原创 OkHttp

* 开发环境 * *///public static final String BASE_URL="http://172.17.8.100";/*http://172.17.8.100/small/commodity/v1/commodityList* 测试环境* */public static final String BASE_URL="http://172.17.8.10...

2019-01-02 08:21:52 140

原创 TabLayout动态添加framgnet

public class MainActivity extends AppCompatActivity { private ArrayList&lt;Fragment&gt; fragments = new ArrayList&lt;&gt;(); private ViewPager viewpager; private TabLayout tabLayout; ...

2018-12-25 20:30:25 310

原创 Hand解析

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } //接口数据 private String ...

2018-12-21 08:19:39 456

原创 侧滑布局注意事项

&lt;ListView android:layout_width="200dp" android:layout_height="match_parent" android:layout_gravity="left" android:id="@+id/listview" android:choiceMode="singleChoice" andro..

2018-12-21 08:10:30 164

原创 FlyBanner轮播图

//导入依赖 com.recker.flybanner:flybanner:1.3

2018-12-20 09:07:39 102

原创 动态添加Fragment以及Radiogroup

//简单RadioGroupprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); radiogroup = findViewById(R.id.radiogroup);...

2018-12-20 09:05:48 259

原创 网络请求 以及网络状态的工具类

public class Httpcon {// public static String gethttp(Context context,String mpath,String mRam){} public static String gethttp(Context context, String mPath, String mRam){ String ...

2018-12-16 20:34:03 89

空空如也

空空如也

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

TA关注的人

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