自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

浅若清兮

有缘千里来相见!!!!

  • 博客(15)
  • 收藏
  • 关注

原创 经常使用的依赖

 常用的权限:<uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><uses-permission android:name="andr...

2018-05-01 19:17:18 306

原创 简单的流式布局(完整版)

1.首先创建一个自定义View类:public class CustomView extends ViewGroup { private int mleftMargin=20; private int mtopMargin=20; public CustomView(Context context) { this(context,null); }...

2018-05-30 11:29:09 7220

原创 调用系统相机6.0以上需要加的权限

1.先在清单文件里注册:<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.zz.fileprovider" android:exported="false" android:grantUriPermissions="true"&gt...

2018-05-29 21:16:24 920

原创 流式布局

public class CustomView extends ViewGroup { private int ori = 0; private int hmode; private int hmode1; public CustomView(Context context) { this(context, null); } pu...

2018-05-29 17:09:13 241

原创 调用系统相机用法

1.首先设置读写权限:<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />2.设置存取相片的路径:private Strin...

2018-05-27 16:44:41 507

原创 Android实现计时与倒计时的几种方法

方法一Timer与TimerTask(Java实现)[java] view plain copypublic class timerTask extends Activity{           private int recLen = 11;        private TextView txtView;        Timer timer = new Timer();          ...

2018-05-22 09:03:45 2098

原创 抽取基类 Fragment

public abstract class Fragments<T extends FragmentsPresenter> extends Fragment implements IFragments { public T fragments; @Nullable @Override public View onCreateView(@NonNull ...

2018-05-21 14:30:45 393

原创 抽取基类 BaseActivity

public abstract class BaseActivity<P extends BasePresenter> extends AppCompatActivity implements IBaseView { public P presenter; @Override protected void onCreate(Bundle savedInstan...

2018-05-21 14:28:03 473

原创 (拦截器)Interceptor 配合Rxjava 与Retrofit (工具类)

class LoggingInterceptor implements Interceptor { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Response response = ...

2018-05-18 20:27:47 548

原创 封装Rxjava 与 Retrofit 工具类

public class RetrofitUtils { private static RetrofitUtils retrofitUtils; public static RetrofitApi retrofitApi; private RetrofitUtils() { } public RetrofitUtils getInstance(){ ...

2018-05-18 20:25:25 243

原创 沉浸式 几行代码轻松搞定

  找到 values 下  style 文件:代码如下<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your the...

2018-05-17 15:22:03 730

原创 封装Fresco 工具类

public class FrescoUtils {    public static void setControllerListener(final SimpleDraweeView simpleDraweeView, String imagePath, final int imageWidth) {        final ViewGroup.LayoutParams layoutPara...

2018-05-15 15:27:16 518

原创 实现 ViewFlipper 跑马灯 效果

<LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"><ViewFlipper android:layout_width="match_parent" android:layout...

2018-05-10 09:30:16 866

原创 添加依赖实现底部导航栏

一首先添加依赖:compile 'com.hjm:BottomTabBar:1.1.1'二然后写布局文件:<com.hjm.bottomtabbar.BottomTabBar android:id="@+id/bottab" android:layout_width="match_parent" android:layout_height="match_paren...

2018-05-07 13:36:51 364

原创 使用MVP模式 实现购物车

所需要的依赖12345678compile 'com.android.support:appcompat-v7:24.2.1'   testCompile 'junit:junit:4.12'   compile 'com.squareup.okhttp3:okhttp:3.9.0'   compile 'com.squareup.okhttp3:logging-interceptor:3.9.0...

2018-05-01 19:00:44 286

空空如也

空空如也

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

TA关注的人

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