- 博客(24)
- 收藏
- 关注
原创 WebView基本跳转与JS交互
正常加载public class SecondActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(...
2019-03-03 20:05:59
375
原创 Toolbar基本使用
布局:<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android
2019-02-25 20:02:31
233
原创 Fresco
布局:主页面<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.andr
2019-02-13 19:53:52
191
原创 Recycler多条目
适配器public class CrosseTalkAdapter extends RecyclerView.Adapter { //定义两种常量 表示两种条目类型 public static final int TYPE_LEFT_IMAGE = 0; public static final int TYPE_RIGHT_IMAGE = 1; private...
2019-01-19 15:59:41
229
原创 自定义小圆
自定义Viewpackage com.example.dell.jingze20190107.view;import android.animation.Animator;import android.animation.ObjectAnimator;import android.content.Context;import android.content.Intent;import...
2019-01-18 19:40:11
192
原创 AsyncTask 方法
public class DemoActivity extends AppCompatActivity {private ListView mLVContents;private DemoAdapter mAdapter;private @SuppressLint("StaticFieldLeak") AsyncTask<String, Integer, List<List&lt...
2018-12-27 18:57:41
348
原创 JSon
public class MainActivity extends AppCompatActivity {private ListView mLVContents;private DemoAdapter mAdapter;private final int UPDATE_UI = 1;private Handler mHandler = new Handler(){ @Over...
2018-12-27 18:57:32
159
原创 ListView
public class DemoAdapter extends BaseAdapter {private List<List<String>> mDatas;private Context mContext;public DemoAdapter(Context context) { this.mContext = context; m...
2018-12-27 18:57:24
174
原创 从网上获取图片
public class RequestImageActivity extends Activity {private EditText input;private Button load;private ImageView image;private final int UPDATE_UI = 1; @SuppressLint("HandlerLeak") private Hand...
2018-12-27 18:57:02
245
原创 判断网络
public class NetUtil {//是否有可用的网络 public static boolean hasNetwork(Context context) { ConnectivityManager cm= (ConnectivityManager) context.getSystemService(context.CONNECTIVITY...
2018-12-27 18:56:56
176
转载 获取网络请求
**获取网络请求**public class MainActivity extends Activity {private Button query;private EditText input;private TextView info;private final int UPDATE_UI = 1;@SuppressLint("HandlerLeak")private Ha...
2018-12-27 18:56:49
319
原创 属性动画+跳转
布局activity_second<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...
2018-12-21 11:06:56
180
原创 兴趣树
布局activity_tree&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schem
2018-12-20 11:07:30
257
原创 MVP+Okhttp网络请求+动画+RecyclerView
相关依赖:在 build.gradle上加入configurations.all {resolutionStrategy.eachDependency { DependencyResolveDetails details -&amp;amp;amp;amp;amp;gt;def requested = details.requestedif (requested.group == ‘com.android.support’) ...
2018-12-16 19:54:40
423
原创 补间动画+属性动画+属性其他动画
布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;Button android:id="@+id/button_translate" android:layout_width="match_parent" android:lay
2018-12-15 09:04:23
1325
原创 OKHttp网络请求
package com.example.jingze16.util;import android.os.Handler;import android.os.Looper;import android.util.Log;import com.example.jingze16.Constants;import com.google.gson.Gson;import java.io.File...
2018-12-14 09:00:33
270
原创 自定义view流布局
布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;EditText android:id="@+id/et" android:layout_width="match_parent" android:layout_height=&
2018-12-01 10:05:37
255
1
原创 自定义View大转盘
布局<?xml version="1.0" encoding="utf-8"?><com.example.myapplication.CustomCircleViewandroid:id="@+id/custom"android:layout_width=“wrap_content”android:layout_height=“500dp” /><com...
2018-11-30 19:07:33
567
原创 POST请求
public class PostRequestActivity extends Activity {private Button query;private EditText input;private TextView info;private final int UPDATE_UI = 1;private Handler mHandler = new Handler() { ...
2018-11-29 20:59:09
310
原创 咨询实战(1)模拟月考 侧拉-imageloader,pullRefresh TabLayout 频道管理
activity 包:LoginActivitypublic class LoginActivity extends AppCompatActivity {TextView textView;int time = 3;int temp = 0;Handler handler = new Handler(){ @Override public void handleMe...
2018-11-22 15:53:26
204
原创 屏幕适配
布局<?xml version="1.0" encoding="utf-8"?><FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <View android:id="@+id/vie
2018-11-22 11:28:41
185
原创 倒计时+频道管理
依赖compile ‘com.github.andyoom:draggrid:v1.0.1’写在Project中的build.gradleallprojects {repositories {google()jcenter() maven {url "https://jitpack.io"} (上面的自带,只写这一行)}}清单文件中注册activity_main中...
2018-11-21 11:01:29
203
原创 简单Banner使用方法
依赖compile ‘com.youth.banner:banner:1.4.10’implementation ‘com.github.bumptech.glide:glide:4.8.0’布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=“http://schemas.androi...
2018-11-17 11:53:41
941
原创 轮播图的两种方法
依赖implementation ‘com.android.support:design:27.1.1’implementation ‘com.nostra13.universalimageloader:universal-image-loader:1.9.5’implementation ‘com.google.code.gson:gson:2.8.5’implementation pr...
2018-11-17 08:44:16
382
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人