- 博客(29)
- 收藏
- 关注
原创 gwc
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:orientation="horizontal" android:padding="2dp" android:layout_g...
2019-03-07 20:48:09 681 1
原创 ijkplayer视频播放
权限:<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission><uses-permission android:name="android.permission.INTERNET"/> 依赖:compile 'com....
2019-01-19 11:41:53 245
原创 相机相册
public class LeftFragment extends Fragment implements OnClickListener { private View view; private ImageView img_icon; private Button btn_shang; private PopupWindow window; private...
2019-01-18 10:51:42 134
原创 retrofit
public interface MyApiService { //Retrofit + Rxjava @GET Observable<ResponseBody> get(@Url String url,@QueryMap Map<String,String> map); @POST Observable<ResponseBo...
2019-01-07 08:09:26 190
原创 购物车
首先接口是http://www.wanandroid.com/tools/mockapi/6523/restaurant-list然后在bean类的SpusBean集合下加一个 isChildChecked ,添加有参,get,set方法然后代码在https://github.com/WeiShuaiG/yuekao12moni下 ...
2018-12-20 16:55:34 103
原创 高德
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.umeng.soexample.gaode"> <uses-permission android:...
2018-12-20 15:49:29 151
原创 动画
布局:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:...
2018-12-15 11:52:01 116
原创 recycle各种布局
adapter:瀑布流:public class BeautyAdapter extends RecyclerView.Adapter<BeautyAdapter.ViewHolder> { private ArrayList<BeautyBean> mList; private Context mContext; public Beau...
2018-12-15 11:47:14 260
原创 OKheep
public class OkUtils { private OkHttpClient okHttpClient; private OkUtils() { //日志拦截器 HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); okHttpC...
2018-12-15 11:42:15 117
原创 极光推送
build:android { compileSdkVersion 28 defaultConfig { applicationId "soexample.umeng.com.jpushdemo" minSdkVersion 15 targetSdkVersion 28 versionCode 1 ...
2018-12-14 15:51:39 371
原创 第三方分享
清单文件:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.umeng.soexample"> <uses-permission android:na
2018-12-09 19:00:26 655
原创 捕获异常
首先加读写权限public class MainActivity extends AppCompatActivity { private TextView mText; private String jsonStr = "{\n" + " \"news_id\": \"13810\",\n" + " \"new...
2018-12-07 19:47:35 121
原创 mvp登录注册
MyCallBack:public interface MyCallBack<T> { void setData(T user); void setError(T error);}model:public interface Model { //当我这个type==1时操作登录 当我这个type==2时操作注册 void getData(...
2018-12-07 19:44:34 181
原创 Zxing二维码
依赖:implementation 'com.github.yuzhiqiang1993:zxing:2.1.4'权限:<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_...
2018-12-07 19:34:02 304
原创 转盘
action_main:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" ...
2018-12-01 10:41:40 138
原创 流式布局
首先attr.xml<resources> <declare-styleable name="GroupDemoView"> <attr name="textColor" format="string" /> </declare-styleable></resources>
2018-12-01 10:29:35 90
原创 pulltoRefresh
public class PullFragment extends Fragment { private PullToRefreshListView plv_news; private List<News.DataBean> list; private MyBaseAdapter adapter; private int page =1; ...
2018-11-22 19:06:15 87
原创 三秒跳转
public class MainActivity extends Activity { private TextView text_time; private int time = 3; private Handler handler = new Handler() { public void handleMessage(android.os.Messa...
2018-11-22 19:03:32 554
原创 基类
public abstract class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); prev...
2018-10-26 07:54:25 420
原创 fragment+viewpager
public class MainActivity extends BaseActivity implements View.OnClickListener { private ViewPager vp; private List<Fragment> list; private ShouyeFragment shouyeFragment; priva...
2018-10-24 10:21:07 150
原创 PINDAO
频道管理1、首先在项目的build下注册allprojects {repositories {jcenter()//下面这句才是加上的,上面的自带 的maven {url "https://jitpack.io"}} }2、然后在app下的build中导入依赖compile 'com.github.andyoom:draggrid:v1.0.1'...
2018-10-24 10:10:10 372
原创 轮播图
public class MainActivity extends AppCompatActivity { private ViewPager vp; private ArrayList<ImageView> imageViews = new ArrayList<>(); private int[] imageResIds = { ...
2018-10-21 18:32:02 110
原创 抽屉
public class MainActivity extends AppCompatActivity { private DrawerLayout draw_layout; private ViewPager vp; private TabLayout tabLayout; private ActionBarDrawerToggle toggle; @...
2018-10-21 18:25:24 89
原创 网络请求
public class NetWorkUtils { //判断网络是否连接 public static boolean isNetWorkAvailable(Context context) { //网络连接管理器 ConnectivityManager connectivityManager = (ConnectivityManager) c...
2018-10-19 09:52:43 91
原创 今日头条
activity_main:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_heig...
2018-09-21 10:28:33 330 1
原创 频道管理
activity_main:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_heig...
2018-09-21 10:13:47 222
原创 week3_01
public class HttpUtils { public static String getFromHttp(String urlStr) { String result = ""; try { URL url = new URL(urlStr); HttpURLConnection connectio...
2018-09-17 08:03:43 104
原创 购物车
白 08:31:33<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>disanzhou</title> <script src="js/angular.min.js"></script&
2018-04-07 08:32:01 106
原创 aaa
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="../zhoukao2/js/angular.min.js&q
2018-04-06 21:06:51 72
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人