- 博客(18)
- 收藏
- 关注
原创 购物车点击事件
展示页面public class ShouFragment extends Fragment implements ContarInterfac.shouFragmentFace {ContarInterfac.PresenterFara presenterFara;TextView text_zong;RecyclerView recyclerview_1;public CheckBo...
2019-04-06 17:53:44 708
原创 九宫格图
String image = list.get(position).getImage();split = image.split(",");myNextAdapter = new MyNextAdapter(context,split); if (split.length ==1){ // myViewHolder.recyclerView.setLayoutManage...
2019-05-29 15:36:32 306
原创 weiview连接
String details = xianbean.getResult().getDetails();WebSettings webSettings = webView.getSettings();webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小webSettings.setLoadWithOverviewMode(tru...
2019-05-23 09:51:21 446
原创 greendao
public class MainActivity extends AppCompatActivity {@BindView(R.id.edit)EditText mEdit;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); se...
2019-05-11 11:56:17 151
原创 tablayout连接viewpager
public class MainActivity extends AppCompatActivity {@BindView(R.id.view_pager)ViewPager viewPager;@BindView(R.id.tab_layout)TabLayout tabLayout;List<Fragment> list = new ArrayList<>(...
2019-05-06 11:06:31 129
原创 组合控件加减
自定义加减public class Title extends LinearLayout{TextView text_jia,text_num,text_jian;int ss=0;MyCallBack myCallBack;public Title(Context context) {super(context);}public Title(Context context, At...
2019-05-06 10:16:36 306
原创 设置图片大小
/*** 根据给定的宽和高进行拉伸** @param origin 原图* @param newWidth 新图的宽* @param newHeight 新图的高* @return new.json Bitmap*/private Bitmap scaleBitmap(Bitmap origin, float newWidth, float newHeight) {if ...
2019-04-29 13:53:29 667
原创 Fresco展示
layout页面<com.facebook.drawee.view.SimpleDraweeView android:layout_width="300dp" android:layout_height="300dp" android:id="@+id/simpledraweeview" />Activity页面private void init(...
2019-04-10 19:27:59 133
原创 购物车展示加减总价
展示页面public class ShouFragment extends Fragment implements ContarInterfac.shouFragmentFace{ContarInterfac.PresenterFara presenterFara;TextView text_zong;RecyclerView recyclerview_1;public CheckBo...
2019-04-06 15:02:34 250
原创 Glide外部缓存
@GlideModulepublic class MyGlide extends AppGlideModule{@Overridepublic void applyOptions(Context context, GlideBuilder builder){ super.applyOptions(context,builder); String path= getstr()+...
2019-03-31 20:03:30 262
原创 跑马字
ValueAnimator animator=null;int x =0;@Overrideprotected void onDraw(Canvas canvas) {super.onDraw(canvas);canvas.drawBitmap(creta(bitmap,w),0,0,paint);canvas.drawText(name,x,160,paint);if(isgoin...
2019-03-28 19:52:45 343
原创 自定义设置圆形头像
public class MyView extends View{public MyView(Context context) { super(context);}public MyView(Context context, @Nullable AttributeSet attrs) { super(context, attrs);}public MyView(Co...
2019-03-28 19:01:35 233
原创 JS交互
public class MainActivity extends AppCompatActivity {WebView web_view;Button but_js;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setCon...
2019-03-27 09:22:37 555
原创 OKhttp封装类
public class OkhttpUtile {public static OkhttpUtile utile;OkHttpClient okHttpClient;//构造方法私有化private OkhttpUtile(){okHttpClient = new OkHttpClient.Builder().addInterceptor(new Interceptor() {@...
2019-03-25 11:50:07 406
原创 第三方登陆
image_view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { UMShareAPI umShareAPI=UMShareAPI.get(LoginActivity.this); umS...
2019-03-24 19:32:05 121
原创 引导页
public class MainActivity extends AppCompatActivity { MyView my_View; private ValueAnimator animator;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedIns...
2019-03-22 19:33:18 218
原创 流式布局
//左边距和上边距int mleftMargin=20;int mtopMargin=20;public MyView(Context context) { super(context);}public MyView(Context context, AttributeSet attrs) { super(context, attrs);}public MyVie...
2019-03-22 11:11:18 185
原创 MVP
工具类public class OkhttpUtil {OkHttpClient okHttpClient;static OkhttpUtil okhttpUtil;public OkhttpUtil(){ okHttpClient = new OkHttpClient.Builder().addInterceptor(new MyInterceptor()).build();}...
2019-03-17 20:34:35 151
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人