- 博客(45)
- 收藏
- 关注
原创 Android技术点汇总
Java部分Java关键字的作用 final、static this、super return、break 重载、重写..设计模式(单例、观察者、工厂、代理、构造者..) java容器 (List、Set、Map..) ...
2020-02-02 15:22:56 1173
原创 JD
MainActivity.javapublic class MainActivity extends AppCompatActivity { @BindView(R.id.main_pager) ViewPager mViewPager; @BindView(R.id.main_group) RadioGroup mRadioGroup; @O...
2019-01-20 10:50:48 360
原创 调用相机相册
@OnClick(R.id.publish_img_picture) public void onImgClick() { //添加照片 AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("图片"); builder.setMessa...
2019-01-20 09:22:09 311
原创 购物车二级列表-双层RecylerView嵌套
HomeFragmentpublic class HomeFragment extends Fragment implements IView{ @BindView(R.id.home_rv_group) RecyclerView mRecyclerView_group; private IPrecenterImpl mIPrecenter; @Nul...
2019-01-14 08:14:47 331
原创 Retrofit解决使用多个BASE_URL的问题
private static RetrofitManager mRetrofitManager; private static String BASE_URL="http://www.zhaoapi.cn/"; private final BaseApis mBaseApis; private RetrofitManager() { OkHtt...
2019-01-13 16:13:14 1337
原创 Rv线性布局与网格切换-Butterknife-Fresco-EventBus-Retrofit
MainActivity.javapublic class MainActivity extends AppCompatActivity implements IView{ @BindView(R.id.main_img) ImageView mImageView; @BindView(R.id.main_rv) RecyclerView mRecycl...
2019-01-01 19:44:29 299
原创 Retrofit-封装
BaseApis.javaimport java.util.Map;import okhttp3.ResponseBody;import retrofit2.http.GET;import retrofit2.http.POST;import retrofit2.http.QueryMap;import retrofit2.http.Url;import rx.Observa...
2019-01-01 19:32:26 293 1
原创 反射-注解
MainActivity.javapublic class MainActivity extends AppCompatActivity implements View.OnClickListener{ private Button mButton2; private Button mButton3; private Button mButton4; Cl...
2018-12-27 08:24:25 176
原创 Fresco-高斯模糊
首先效果图 MainActivity.javapublic class MainActivity extends AppCompatActivity { public String url="http://img5.duitang.com/uploads/item/201312/03/20131203153823_Y4y8F.jpeg"; @Override...
2018-12-25 11:05:35 693
原创 流式布局-保存历史记录
Cfrg.javapublic class Cfrag extends Fragment{ private TitleBarView mTitleBarView; List<String> ff=new ArrayList<>(); private CustomWaterFallViewGroup mFallViewGroup; pri...
2018-12-21 11:41:29 253
原创 WebView与Js交互
MainActivity.javapublic class MainActivity extends AppCompatActivity { //这是本地的写法// private static final String HTML_URL = "file:///android_asset/test.html"; private static final String...
2018-12-18 16:52:22 275
原创 购物车
Afrag.javapublic class Afrag extends Fragment implements View.OnClickListener{ private ExpandableListView mExpandableListView; private CheckBox mCheckBox; private TextView mText_price;...
2018-12-18 16:31:32 194
原创 截取图片字符串路径
String str = ""; int length = list.get(position).getImages().length(); for (int j = 0; j < length; j++) { if(list.get(position).getImages().substring(j, j + 1).equals("...
2018-12-16 20:30:25 580
原创 XRecyclerView
mXRecyclerView.setPullRefreshEnabled(true); mXRecyclerView.setLoadingMoreEnabled(true); mXRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { @Override...
2018-12-16 19:39:07 189
原创 RecyclerView多条目
MianActivity.javapublic class MainActivity extends AppCompatActivity implements View.OnClickListener{ private ImageView mImageView; private TextView mTextView; private Button mButton;...
2018-12-15 11:43:10 188
原创 极光推送-集成
https://docs.jiguang.cn/jpush/client/Android/android_guide/在 module 的 gradle 中添加依赖和 AndroidManifest 的替换变量。android { ...... defaultConfig { applicationId "com.xxx.xxx" //JPush 上注册的...
2018-12-15 11:04:00 193
原创 Ok日志拦截器
private OkHttpUtils() { HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(); interceptor.setLevel(HttpLoggingInterceptor.Level.BODY); //1.创建日志拦截器 /** ...
2018-12-10 19:18:59 376
原创 QQ第三方登录-分享
MainActivity.javapublic class MainActivity extends AppCompatActivity implements View.OnClickListener { private Button QQ_Share; private Button QQ_login; @Override protected void o...
2018-12-07 19:44:00 234
原创 文字跑马灯
MarqueeTextView.java //新建一个自定义控件,继承TextView就行public class MarqueeTextView extends android.support.v7.widget.AppCompatTextView{ public MarqueeTextView(Context context) { super(context)...
2018-12-06 20:51:34 440
原创 根据输入框输入内容长度改变按钮状态-全局异常捕获
MainActivity.javapublic class MainActivity extends AppCompatActivity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setC...
2018-12-06 20:07:28 602
原创 MVP架构
MvpActivity.javapublic class MvpActivity extends AppCompatActivity implements IView, View.OnClickListener { private IPresenterImpl mPresenter; private Button Send_Btn; private TextView...
2018-12-05 20:06:14 170
原创 扫描-生成二维码
MainActivity.javapublic class MainActivity extends AppCompatActivity { private ImageView mImageView; private EditText mEditText; @Override protected void onCreate(Bundle savedInst...
2018-12-03 20:54:40 229
原创 保存搜索历史记录
MainActivity.javapublic class MainActivity extends AppCompatActivity { List<String> ff=new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { ...
2018-11-30 19:13:01 1759
原创 输入框输入数字生成条形统计图
MainActivity.javapublic class MainActivity extends AppCompatActivity { private EditText mEditText1; private EditText mEditText2; private EditText mEditText3; private Button mButton;...
2018-11-30 11:26:55 707
原创 抽奖转盘
MainActivity.javapublic class MainActivity extends AppCompatActivity { CustomCircleView customCircleView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCr...
2018-11-29 08:16:59 790
原创 购物-分类
SecondActivity.javapublic class SecondActivity extends AppCompatActivity{ private ViewPager mPager; private RadioGroup mRadioGroup; @Override protected void onCreate(@Nullable Bundle...
2018-11-22 19:03:08 283
原创 购物车-整体页面逻辑
MainActivity.javapublic class MainActivity extends AppCompatActivity implements View.OnClickListener{ String url = "http://www.zhaoapi.cn/product/getCarts"; private ExpandableListView el_car...
2018-11-21 11:55:51 374
原创 OkHttp网络加载数据+RecyclerView展示+属性动画
MainActivity.javapublic class MainActivity extends AppCompatActivity implements HttpUrls.ff{ private ImageView mImageView; private RecyclerView mRecyclerView; RvAdapter rvAdapter; Li...
2018-11-18 19:38:56 465
原创 第三方登录-分享
MainActivity.java/** * 实现QQ的第三方登录 * 1.搭建环境(添加Jar包,添加Res图片,布局,Values资源,添加权限,配置Activity信息,修改Key值,build签名配置,Application初始化) * 2.写布局 * 3.登录的代码 * 注意:必须用真机测试 */public class MainActivity extends App...
2018-11-15 19:10:15 272
原创 属性动画
MainActivity.java/*属性动画的特点:动画效果会改变控件的位置.且开启动画的是动画对象,而不是控件对象. 只有旋转的属性动画是经常用的,注意参数. 注意:这些方法都是安卓在3.0以后出现的新特性,所以要把AndroidManifest.xml里的android:minSdkVersion值修改为11以上*///注释后面有222的暂时不用管....
2018-11-14 19:04:50 245
原创 RecyclerView-点击条目删除
MainActivity.javapublic class MainActivity extends AppCompatActivity implements View.OnClickListener{ private Button mButton1; private Button mButton2; private Button mButton3; priva...
2018-11-14 18:49:29 1745
原创 OkHttp_下载图片+上传图片
MainActivity.javapublic class MainActivity extends AppCompatActivity { private String Path = "https://10.url.cn/eth/ajNVdqHZLLAxibwnrOxXSzIxA76ichutwMCcOpA45xjiapneMZsib7eY4wUxF6XDmL2FmZEVYsf86i...
2018-11-13 19:58:32 614
原创 OkHttp_post请求
MainActivity.javapublic class MainActivity extends AppCompatActivity { private EditText mEt_qq; private EditText mEt_pwd; private TextView mTv_status; String path = &quot;http://169.254....
2018-11-13 19:51:35 194
原创 登录代码MVP架构
MainActivity.javapublic class MainActivity extends AppCompatActivity implements View.OnClickListener, Mvp.fff { private EditText mUsername; private EditText mPassword; private Button log...
2018-11-09 09:45:12 213
原创 扫描二维码,生成二维码
MainActivity.javapublic class MainActivity extends AppCompatActivity { private ImageView mImageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreat...
2018-11-08 16:36:27 233
原创 继承式自定义控件_滑动ScrollView,标题颜色渐变
MainActivity.javapublic class MainActivity extends AppCompatActivity { private ImageView mIvDetail; private ObservableScrollView mScrollView; private TextView mTvTitlebar; private Re...
2018-11-07 13:50:06 209
原创 组合式自定义控件_购物车加减商品操作
MainActivity.javapublic class MainActivity extends AppCompatActivity { private Addand mAddand; @Override protected void onCreate(Bundle savedInstanceState) { ...
2018-11-07 13:44:24 191
原创 拖动小圆球
public class Custom extends View{ Paint paint; private float cx; //圆点默认X坐标 private float cy; //圆点默认Y坐标 private int radius = 40; private int mX1; private int mY1; ...
2018-11-05 08:19:30 222
原创 自绘式自定义控件_旋转轮盘+ToolBar标题
MainActivity.javapublic class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setC...
2018-11-04 19:05:59 367
原创 ViewPager引导页,Xlv网络获取,频道管理
MainActivity.javapublic class MainActivity extends AppCompatActivity { //图片引导页 private ViewPager pager; private Button button; ArrayList&lt;Integer&gt; list; private SharedPreferenc...
2018-10-25 14:08:35 214
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人