list) {
25 | super(fm);
26 | mTabTitleList = list;
27 | }
28 |
29 | @Override
30 | public Fragment getItem(int position) {
31 | NewsItemFragment fragment =
32 | (NewsItemFragment) FragmentFactory.creatNewsFragment(mTabTitleList.get(position));
33 | ConstantUtils.ENewsType[] newsTypes = ConstantUtils.ENewsType.values();
34 | fragment.setNewsType(newsTypes[position]);
35 | return fragment;
36 | }
37 |
38 | @Override
39 | public int getCount() {
40 | return mTabTitleList.size();
41 | }
42 |
43 | @Override
44 | public CharSequence getPageTitle(int position) {
45 | return mTabTitleList.get(position);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/RefreshCallback.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter;
2 |
3 |
4 | import com.leonwang.app.chinashop.iml.SwipeRefreshCallback;
5 |
6 | /**
7 | * Author :LeonWang
8 | *
9 | * Created 2016/9/26.15:03
10 | *
11 | * 描述:刷新回调
12 | */
13 |
14 | public abstract class RefreshCallback implements SwipeRefreshCallback {
15 |
16 | @Override
17 | public void refreshComplete() {
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/ResultListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.TextView;
9 | import com.leonwang.app.chinashop.R;
10 | import com.leonwang.app.chinashop.db.dao.bean.City;
11 |
12 | import java.util.List;
13 |
14 | /**
15 | * author zaaach on 2016/1/26.
16 | */
17 | public class ResultListAdapter extends BaseAdapter {
18 | private Context mContext;
19 | private List mCities;
20 |
21 | public ResultListAdapter(Context mContext, List mCities) {
22 | this.mCities = mCities;
23 | this.mContext = mContext;
24 | }
25 |
26 | public void changeData(List list){
27 | if (mCities == null){
28 | mCities = list;
29 | }else{
30 | mCities.clear();
31 | mCities.addAll(list);
32 | }
33 | notifyDataSetChanged();
34 | }
35 |
36 | @Override
37 | public int getCount() {
38 | return mCities == null ? 0 : mCities.size();
39 | }
40 |
41 | @Override
42 | public City getItem(int position) {
43 | return mCities == null ? null : mCities.get(position);
44 | }
45 |
46 | @Override
47 | public long getItemId(int position) {
48 | return position;
49 | }
50 |
51 | @Override
52 | public View getView(int position, View view, ViewGroup parent) {
53 | ResultViewHolder holder;
54 | if (view == null){
55 | view = LayoutInflater.from(mContext).inflate(R.layout.item_search_result_listview, parent, false);
56 | holder = new ResultViewHolder();
57 | holder.name = (TextView) view.findViewById(R.id.tv_item_result_listview_name);
58 | view.setTag(holder);
59 | }else{
60 | holder = (ResultViewHolder) view.getTag();
61 | }
62 | holder.name.setText(mCities.get(position).getName());
63 | return view;
64 | }
65 |
66 | public static class ResultViewHolder{
67 | TextView name;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/SwipeAdapter1.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.LayoutRes;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import com.leonwang.app.chinashop.iml.SwipeItemCallback;
10 |
11 |
12 | /**
13 | * Author :LeonWang
14 | *
15 | * Created 2016/9/26.15:03
16 | *
17 | * 描述:一种ViewType基类
18 | */
19 |
20 | public abstract class SwipeAdapter1 extends SwipeAdapter {
21 |
22 | public SwipeAdapter1(Context context, SwipeItemCallback swipeItemCallback) {
23 | super(context, swipeItemCallback);
24 | }
25 |
26 | /**
27 | * 用户item布局id
28 | */
29 | @LayoutRes
30 | protected abstract int userLayoutResId();
31 |
32 | /**
33 | * 创建用户ViewHolder
34 | */
35 | protected abstract UVH createUserViewHolder(View view);
36 |
37 | @Override
38 | public UVH userViewHolder(ViewGroup parent, int viewType) {
39 | return createUserViewHolder(mLayoutInflater.inflate(userLayoutResId(), parent, false));
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/VedioPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 |
7 | import com.leonwang.app.chinashop.config.FragmentFactory;
8 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.VideoItemFragment;
9 | import com.leonwang.app.chinashop.utils.ConstantUtils;
10 | import com.leonwang.app.chinashop.utils.LogUtils;
11 |
12 | import java.util.List;
13 |
14 | /**
15 | * 当前类注释:视频模块
16 | * Author :LeonWang
17 | * Created 2016/9/22.15:04
18 | * Description:
19 | * E-mail:lijiawangjun@gmail.com
20 | */
21 |
22 | public class VedioPagerAdapter extends FragmentPagerAdapter{
23 | private List mTabTitleList;
24 |
25 | public VedioPagerAdapter(FragmentManager fm, List list) {
26 | super(fm);
27 | mTabTitleList = list;
28 | LogUtils.d("----------------mTabTitleList长度--------------"+mTabTitleList.size());
29 | }
30 |
31 | @Override
32 | public Fragment getItem(int position) {
33 | VideoItemFragment fragment =
34 | (VideoItemFragment) FragmentFactory.creatVedioFragment(mTabTitleList.get(position));
35 | ConstantUtils.LolType[] lolTypes = ConstantUtils.LolType.values();
36 | fragment.setLolType(lolTypes[position]);
37 | return fragment;
38 | }
39 |
40 | @Override
41 | public int getCount() {
42 | return mTabTitleList.size();
43 | }
44 |
45 | @Override
46 | public CharSequence getPageTitle(int position) {
47 | return mTabTitleList.get(position);
48 | }
49 |
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/LolVideoViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter.vhs;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 | import android.widget.TextView;
7 |
8 | import com.leonwang.app.chinashop.R;
9 |
10 | import butterknife.BindView;
11 | import butterknife.ButterKnife;
12 |
13 | /**
14 | * 当前类注释:
15 | * Author :LeonWang
16 | * Created 2016/9/27.16:23
17 | * Description:
18 | * E-mail:lijiawangjun@gmail.com
19 | */
20 |
21 | public class LolVideoViewHolder extends RecyclerView.ViewHolder {
22 |
23 |
24 | @BindView(R.id.ivNews)
25 | public ImageView mIvNews;
26 | @BindView(R.id.tvTitle)
27 | public TextView mTvTitle;
28 | @BindView(R.id.tvDesc)
29 | public TextView mTvDesc;
30 |
31 | public LolVideoViewHolder(View itemView) {
32 | super(itemView);
33 | // LayoutInflater.from(App.getInstance()).inflate(R.layout.item_videos, null);
34 | ButterKnife.bind(this, itemView);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/TopNewsViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter.vhs;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 | import android.widget.TextView;
7 |
8 | import com.leonwang.app.chinashop.R;
9 |
10 | import butterknife.BindView;
11 | import butterknife.ButterKnife;
12 |
13 | /**
14 | * 当前类注释:新闻
15 | * Author :LeonWang
16 | * Created 2016/9/23.14:37
17 | * Description:
18 | * E-mail:lijiawangjun@gmail.com
19 | */
20 |
21 | public class TopNewsViewHolder extends RecyclerView.ViewHolder {
22 |
23 | @BindView(R.id.tv_tab)
24 | public TextView mTvTab;
25 | @BindView(R.id.tv_tab2)
26 | public TextView mTvTab2;
27 | @BindView(R.id.tv_title)
28 | public TextView mTvTitle;
29 | @BindView(R.id.tv_desc)
30 | public TextView mTvDesc;
31 | @BindView(R.id.iv_item)
32 | public ImageView mImageView;
33 | @BindView(R.id.tv_time)
34 | public TextView mTvTime;
35 |
36 | public TopNewsViewHolder(View itemView) {
37 | super(itemView);
38 | ButterKnife.bind(this, itemView);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/baseVhs/DefVH.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter.vhs.baseVhs;
2 |
3 | import android.support.v7.widget.AppCompatTextView;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.widget.ImageView;
7 |
8 | import com.leonwang.app.chinashop.R;
9 |
10 |
11 | /**
12 | * Author :LeonWang
13 | *
14 | * Created 2016/9/26.15:03
15 | *
16 | * 描述:默认VH
17 | */
18 | @SuppressWarnings("all")
19 | public class DefVH extends RecyclerView.ViewHolder {
20 |
21 | public ImageView mImgSwipeDef;
22 | public AppCompatTextView mAtvSwipeDef;
23 |
24 | public DefVH(View itemView) {
25 | super(itemView);
26 | mImgSwipeDef = (ImageView) itemView.findViewById(R.id.img_swipe_def);
27 | mAtvSwipeDef = (AppCompatTextView) itemView.findViewById(R.id.atv_swipe_def);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/baseVhs/MoreVH.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.adapter.vhs.baseVhs;
2 |
3 | import android.support.v7.widget.AppCompatTextView;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.widget.ProgressBar;
7 |
8 | import com.leonwang.app.chinashop.R;
9 |
10 |
11 | /**
12 | * Author :LeonWang
13 | *
14 | * Created 2016/9/26.15:03
15 | *
16 | * 描述:更多VH
17 | */
18 |
19 | public class MoreVH extends RecyclerView.ViewHolder {
20 |
21 | public AppCompatTextView mAtvSwipeMore;
22 | public ProgressBar mPbSwipeMore;
23 |
24 | public MoreVH(View itemView) {
25 | super(itemView);
26 | mAtvSwipeMore = (AppCompatTextView) itemView.findViewById(R.id.atv_swipe_more);
27 | mPbSwipeMore = (ProgressBar) itemView.findViewById(R.id.pb_swipe_more);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/baidulocation/Utils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.baidulocation;
2 |
3 | public class Utils {
4 | public final static String CoorType_GCJ02 = "gcj02";
5 | public final static String CoorType_BD09LL= "bd09ll";
6 | public final static String CoorType_BD09MC= "bd09";
7 | /***
8 | *61 : GPS定位结果,GPS定位成功。
9 | *62 : 无法获取有效定位依据,定位失败,请检查运营商网络或者wifi网络是否正常开启,尝试重新请求定位。
10 | *63 : 网络异常,没有成功向服务器发起请求,请确认当前测试手机网络是否通畅,尝试重新请求定位。
11 | *65 : 定位缓存的结果。
12 | *66 : 离线定位结果。通过requestOfflineLocaiton调用时对应的返回结果。
13 | *67 : 离线定位失败。通过requestOfflineLocaiton调用时对应的返回结果。
14 | *68 : 网络连接失败时,查找本地离线定位时对应的返回结果。
15 | *161: 网络定位结果,网络定位定位成功。
16 | *162: 请求串密文解析失败。
17 | *167: 服务端定位失败,请您检查是否禁用获取位置信息权限,尝试重新请求定位。
18 | *502: key参数错误,请按照说明文档重新申请KEY。
19 | *505: key不存在或者非法,请按照说明文档重新申请KEY。
20 | *601: key服务被开发者自己禁用,请按照说明文档重新申请KEY。
21 | *602: key mcode不匹配,您的ak配置过程中安全码设置有问题,请确保:sha1正确,“;”分号是英文状态;且包名是您当前运行应用的包名,请按照说明文档重新申请KEY。
22 | *501~700:key验证失败,请按照说明文档重新申请KEY。
23 | */
24 |
25 | public static float[] EARTH_WEIGHT = {0.1f,0.2f,0.4f,0.6f,0.8f}; // 推算计算权重_地球
26 | //public static float[] MOON_WEIGHT = {0.0167f,0.033f,0.067f,0.1f,0.133f};
27 | //public static float[] MARS_WEIGHT = {0.034f,0.068f,0.152f,0.228f,0.304f};
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/config/FragmentFactory.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.config;
2 |
3 | import com.leonwang.app.chinashop.base.RxLazyBaseFragment;
4 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.NewsItemFragment;
5 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.VideoItemFragment;
6 |
7 | import java.util.HashMap;
8 | import java.util.Map;
9 |
10 | /**
11 | * 当前类注释:缓存fragment工厂类
12 | * Author :LeonWang
13 | * Created 2016/9/22.15:08
14 | * Description:
15 | * E-mail:lijiawangjun@gmail.com
16 | */
17 |
18 | public class FragmentFactory {
19 |
20 | private static Map mCache = new HashMap<>();
21 |
22 | //新闻fragment
23 | public static RxLazyBaseFragment creatNewsFragment(String tag) {
24 | RxLazyBaseFragment fragment = mCache.get(tag);
25 | if (fragment == null) {
26 | fragment = new NewsItemFragment();
27 | mCache.put(tag, fragment);
28 | }
29 | return fragment;
30 | }
31 |
32 | //视频fragment
33 | public static RxLazyBaseFragment creatVedioFragment(String tag) {
34 | RxLazyBaseFragment fragment = mCache.get(tag);
35 | if (fragment == null) {
36 | fragment = new VideoItemFragment();
37 | mCache.put(tag, fragment);
38 | }
39 | return fragment;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/db/dao/DBOpenHelper.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.db.dao;
2 |
3 | import android.content.Context;
4 | import android.database.sqlite.SQLiteDatabase;
5 | import android.database.sqlite.SQLiteOpenHelper;
6 |
7 | public class DBOpenHelper extends SQLiteOpenHelper {
8 | private static final String DBNAME = "weather.db";
9 |
10 | private static final int VERSION = 2;
11 |
12 | public DBOpenHelper(Context context) {
13 | super(context, DBNAME, null, VERSION);
14 | }
15 |
16 | @Override
17 | public void onCreate(SQLiteDatabase db) {
18 |
19 | }
20 |
21 | @Override
22 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
23 | onCreate(db);
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/db/dao/LocateState.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.db.dao;
2 |
3 | /**
4 | * author zaaach on 2016/1/26.
5 | */
6 | public class LocateState {
7 | public static final int LOCATING = 111;
8 | public static final int FAILED = 666;
9 | public static final int SUCCESS = 888;
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/db/dao/bean/City.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.db.dao.bean;
2 |
3 | /**
4 | * Created by ghbha on 2016/4/27.
5 | */
6 | public class City {
7 | private String provinceName;
8 | private String cityName;
9 | private String areaName;
10 | private String weatherId;
11 | private String areaId;
12 | private String name;
13 | private String pinyin;
14 |
15 | public City() {}
16 |
17 | public City(String name, String pinyin) {
18 | this.name = name;
19 | this.pinyin = pinyin;
20 | }
21 |
22 | public String getName() {
23 | return name;
24 | }
25 |
26 | public void setName(String name) {
27 | this.name = name;
28 | }
29 |
30 | public String getPinyin() {
31 | return pinyin;
32 | }
33 |
34 | public void setPinyin(String pinyin) {
35 | this.pinyin = pinyin;
36 | }
37 |
38 | public String getProvinceName() {
39 | return provinceName;
40 | }
41 |
42 | public void setProvinceName(String provinceName) {
43 | this.provinceName = provinceName;
44 | }
45 |
46 | public String getCityName() {
47 | return cityName;
48 | }
49 |
50 | public void setCityName(String cityName) {
51 | this.cityName = cityName;
52 | }
53 |
54 | public String getAreaName() {
55 | return areaName;
56 | }
57 |
58 | public void setAreaName(String areaName) {
59 | this.areaName = areaName;
60 | }
61 |
62 | public String getWeatherId() {
63 | return weatherId;
64 | }
65 |
66 | public void setWeatherId(String weatherId) {
67 | this.weatherId = weatherId;
68 | }
69 |
70 | public String getAreaId() {
71 | return areaId;
72 | }
73 |
74 | public void setAreaId(String areaId) {
75 | this.areaId = areaId;
76 | }
77 |
78 | @Override
79 | public String toString() {
80 | return "City{" +
81 | "provinceName='" + provinceName + '\'' +
82 | ", cityName='" + cityName + '\'' +
83 | ", areaName='" + areaName + '\'' +
84 | ", weatherId='" + weatherId + '\'' +
85 | ", areaId='" + areaId + '\'' +
86 | ", name='" + name + '\'' +
87 | ", pinyin='" + pinyin + '\'' +
88 | '}';
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/iml/SwipeHelper.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.iml;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.ViewGroup;
5 |
6 | /**
7 | * Created by guilin on 16/7/15.
8 | *
9 | * 描述:列表刷新帮助类
10 | */
11 |
12 | public interface SwipeHelper {
14 |
15 | DVH defViewHolder(ViewGroup parent);
16 |
17 | MVH moreViewHolder(ViewGroup parent);
18 |
19 | UVH userViewHolder(ViewGroup parent, int viewType);
20 |
21 | void bindDefViewHolder(DVH holder);
22 |
23 | void bindMoreViewHolder(MVH holder);
24 |
25 | void bindUserViewHolder(UVH holder, int position);
26 |
27 | int userDataCount();
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/iml/SwipeItemCallback.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.iml;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by guilin on 16/7/15.
7 | *
8 | * 描述:swipe列表点击回调
9 | */
10 |
11 | public interface SwipeItemCallback {
12 |
13 | void callback(View view, int position, E e);
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/iml/SwipeRefreshCallback.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.iml;
2 |
3 | /**
4 | * Created by guilin on 16/7/15.
5 | *
6 | * 描述:刷新回调
7 | */
8 |
9 | public interface SwipeRefreshCallback {
10 |
11 | /**
12 | * 下拉刷新
13 | */
14 | void downRefresh();
15 |
16 | /**
17 | * 加载更多
18 | *
19 | * @param count 用户数据
20 | */
21 | void upRefresh(int count);
22 |
23 | /**
24 | * 刷新完成
25 | */
26 | void refreshComplete();
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/net/api/LolVedioService.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.net.api;
2 |
3 | import com.leonwang.app.chinashop.entity.VideoEntity;
4 |
5 | import java.util.Map;
6 |
7 | import retrofit2.http.GET;
8 | import retrofit2.http.QueryMap;
9 | import rx.Observable;
10 |
11 | /**
12 | * 当前类注释:LOL视频
13 | * Author :LeonWang
14 | * Created 2016/9/27.13:45
15 | * Description:
16 | * E-mail:lijiawangjun@gmail.com
17 | */
18 |
19 | public interface LolVedioService {
20 |
21 | /* @GET("rest/ItemsService/videos{}")
22 | Observable getLolVideoUrl(@Path("catid") String catid,
23 | @Path("catwordid") String catwordid,
24 | @Path("page") String curPage,
25 | @Path("t_") String t_,
26 | @Path("p_") String p_);*/
27 |
28 |
29 | @GET("rest/ItemsService/videos")
30 | Observable getLolVideoUrl(@QueryMap Map params);
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/net/api/TopNewsService.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.net.api;
2 |
3 | import com.leonwang.app.chinashop.entity.TopNewsEntity;
4 |
5 | import retrofit2.http.Field;
6 | import retrofit2.http.FormUrlEncoded;
7 | import retrofit2.http.POST;
8 | import rx.Observable;
9 |
10 |
11 | /**
12 | * 当前类注释:新闻头条数据请求
13 | * Author :LeonWang
14 | * Created 2016/9/23.9:52
15 | * Description:
16 | * E-mail:lijiawangjun@gmail.com
17 | */
18 |
19 | public interface TopNewsService {
20 |
21 | //---->toutiao/index
22 | @FormUrlEncoded
23 | @POST("toutiao/index")
24 | Observable getNews(@Field("type")String type, @Field("key") String data);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherAqiService.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.net.api;
2 |
3 | import com.leonwang.app.chinashop.entity.WeatherAqiEntity;
4 |
5 | import retrofit2.http.GET;
6 | import retrofit2.http.Query;
7 | import rx.Observable;
8 |
9 | /**
10 | * 当前类注释:小米天气实时指数
11 | * Author :LeonWang
12 | * Created 2016/9/29.17:05
13 | * Description:
14 | * E-mail:lijiawangjun@gmail.com
15 | */
16 |
17 | public interface WeatherAqiService {
18 |
19 | @GET("wtr/data/aqi")
20 | Observable getAqiWeather(@Query("city_id") String cityId);
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherDay5Service.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.net.api;
2 |
3 | import com.leonwang.app.chinashop.entity.WeatherDay5Entity;
4 |
5 | import retrofit2.http.GET;
6 | import retrofit2.http.Query;
7 | import rx.Observable;
8 |
9 | /**
10 | * 当前类注释:小米天气未来五天数据
11 | * Author :LeonWang
12 | * Created 2016/9/29.16:59
13 | * Description:
14 | * E-mail:lijiawangjun@gmail.com
15 | */
16 |
17 | public interface WeatherDay5Service {
18 |
19 | @GET("wtr-v2/temp/forecast")
20 | Observable getDay5Weather(@Query("cityId") String cityId);
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherMZService.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.net.api;
2 |
3 | import com.leonwang.app.chinashop.entity.WeatherMZEntity;
4 |
5 | import retrofit2.http.GET;
6 | import retrofit2.http.Path;
7 | import rx.Observable;
8 |
9 | /**
10 | * 当前类注释:魅族天气
11 | * Author :LeonWang
12 | * Created 2016/9/30.10:06
13 | * Description:
14 | * E-mail:lijiawangjun@gmail.com
15 | */
16 |
17 | public interface WeatherMZService {
18 |
19 | @GET("/1.0/weather/{cityid}.json")
20 | Observable getMZWeather(@Path("cityid")String cityid);
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherNowService.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.net.api;
2 |
3 | import com.leonwang.app.chinashop.entity.WeatherNowEntity;
4 |
5 | import retrofit2.http.GET;
6 | import retrofit2.http.Query;
7 | import rx.Observable;
8 |
9 | /**
10 | * 当前类注释:小米天气实时数据
11 | * Author :LeonWang
12 | * Created 2016/9/29.17:02
13 | * Description:
14 | * E-mail:lijiawangjun@gmail.com
15 | */
16 |
17 | public interface WeatherNowService {
18 |
19 | @GET("wtr-v2/temp/realtime")
20 | Observable getNowWeather(@Query("cityId") String cityId);
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/rx/EventBusUtils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.rx;
2 |
3 | import org.greenrobot.eventbus.EventBus;
4 |
5 | /**
6 | *eventbus工具类
7 | */
8 | public class EventBusUtils {
9 |
10 | private EventBusUtils() {
11 | }
12 |
13 | /**
14 | * 注册EventBus
15 | */
16 | public static void register(Object subscriber) {
17 | if (!EventBus.getDefault().isRegistered(subscriber))
18 | EventBus.getDefault().register(subscriber);
19 | }
20 |
21 | /**
22 | * 取消注册EventBus
23 | */
24 | public static void unregister(Object subscriber) {
25 | EventBus.getDefault().unregister(subscriber);
26 | }
27 |
28 | /**
29 | * 发布订阅事件
30 | */
31 | public static void post(Object subscriber) {
32 | EventBus.getDefault().post(subscriber);
33 | }
34 |
35 | /**
36 | * 发布粘性订阅事件
37 | */
38 | public static void postSticky(Object subscriber) {
39 | EventBus.getDefault().postSticky(subscriber);
40 | }
41 |
42 | /**
43 | * 移除指定的粘性订阅事件
44 | * @param eventType class的字节码,例如:String.class
45 | */
46 | public static void removeStickyEvent(Class eventType) {
47 | T stickyEvent = EventBus.getDefault().getStickyEvent(eventType);
48 | if (stickyEvent != null) {
49 | EventBus.getDefault().removeStickyEvent((T) stickyEvent);
50 | }
51 | }
52 |
53 | /**
54 | * 移除所有的粘性订阅事件
55 | */
56 | public static void removeAllStickyEvents() {
57 | EventBus.getDefault().removeAllStickyEvents();
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/rx/RxBus.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.rx;
2 |
3 |
4 | import rx.Observable;
5 | import rx.subjects.PublishSubject;
6 | import rx.subjects.SerializedSubject;
7 | import rx.subjects.Subject;
8 |
9 | /**
10 | * Created by LeonWang on 16/9/20 17:51
11 | * RxBus
12 | *
13 | * Subject同时充当了Observer和Observable的角色,Subject是非线程安全的,
14 | * 要避免该问题,需要将 Subject转换为一个 SerializedSubject ,
15 | * 上述RxBus类中把线程非安全的PublishSubject包装成线程安全的Subject。
16 | *
17 | * PublishSubject只会把在订阅发生的时间点之后来自原始Observable的数据发射给观察者
18 | *
19 | * ofType操作符只发射指定类型的数据,其内部就是filter+cast
20 | *
21 | *
22 | * 当然也可以使用依赖的eventbus3.0
23 | */
24 | public class RxBus
25 | {
26 |
27 | private static volatile RxBus mInstance;
28 |
29 | private final Subject bus;
30 |
31 |
32 | public RxBus()
33 | {
34 |
35 | bus = new SerializedSubject<>(PublishSubject.create());
36 | }
37 |
38 | /**
39 | * 单例模式RxBus2
40 | *
41 | * @return
42 | */
43 | public static RxBus getInstance()
44 | {
45 |
46 | RxBus rxBus = mInstance;
47 | if (mInstance == null)
48 | {
49 | synchronized (RxBus.class)
50 | {
51 | rxBus = mInstance;
52 | if (mInstance == null)
53 | {
54 | rxBus = new RxBus();
55 | mInstance = rxBus;
56 | }
57 | }
58 | }
59 |
60 | return rxBus;
61 | }
62 |
63 |
64 | /**
65 | * 发送消息
66 | *
67 | * @param object
68 | */
69 | public void post(Object object)
70 | {
71 |
72 | bus.onNext(object);
73 | }
74 |
75 | /**
76 | * 接收消息
77 | *
78 | * @param eventType
79 | * @param
80 | * @return
81 | */
82 | public Observable toObserverable(Class eventType)
83 | {
84 |
85 | return bus.ofType(eventType);
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/ui/fragment/ZhihuFragment.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.ui.fragment;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.leonwang.app.chinashop.R;
6 | import com.leonwang.app.chinashop.base.RxLazyBaseFragment;
7 |
8 | /**
9 | * 当前类注释:知乎
10 | * Author :LeonWang
11 | * Created 2016/9/22.13:17
12 | * Description:
13 | * E-mail:lijiawangjun@gmail.com
14 | */
15 |
16 | public class ZhihuFragment extends RxLazyBaseFragment {
17 |
18 | public static ZhihuFragment newInstance(String param3) {
19 | ZhihuFragment zhihuFragment = new ZhihuFragment();
20 | Bundle args = new Bundle();
21 | args.putString("args3",param3);
22 | zhihuFragment.setArguments(args);
23 | return zhihuFragment;
24 | }
25 |
26 | @Override
27 | public int getLayoutResId() {
28 | return R.layout.fragment_zhihu;
29 | }
30 |
31 | @Override
32 | protected void finishCreateView(Bundle savedInstanceState) {
33 |
34 | }
35 |
36 | @Override
37 | protected void lazyLoad() {
38 |
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/AssetsCopyUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.content.Context;
4 |
5 | import java.io.File;
6 | import java.io.FileOutputStream;
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 | import java.io.OutputStream;
10 |
11 | /**
12 | * Created by ghbha on 2016/4/27.
13 | */
14 | public class AssetsCopyUtil {
15 | /**
16 | * 将asseet当中的数据库文件拷到程序目录
17 | */
18 | public static void copyEmbassy2Databases(Context activity,
19 | String filePath, String fileName) {
20 |
21 | File oldfile = new File(filePath, fileName);
22 |
23 | if (oldfile.exists())
24 | return;
25 |
26 | File file = new File(filePath, fileName);
27 |
28 | if (file.exists())
29 | return;
30 |
31 | file.getParentFile().mkdirs();
32 |
33 | InputStream in = null;
34 | OutputStream out = null;
35 |
36 | try {
37 |
38 | out = new FileOutputStream(file);
39 | byte[] buff = new byte[1024];
40 | int len = 0;
41 | in = activity.getAssets().open(fileName);
42 | while ((len = in.read(buff)) > 0) {
43 | out.write(buff, 0, len);
44 | }
45 | out.flush();
46 | in.close();
47 |
48 | } catch (IOException e) {
49 | e.printStackTrace();
50 | } finally {
51 | try {
52 | if (out != null)
53 | out.close();
54 | } catch (IOException e) {
55 | e.printStackTrace();
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/CommonUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.leonwang.app.chinashop.utils;
18 |
19 | import android.content.Context;
20 | import android.content.pm.PackageInfo;
21 | import android.content.pm.PackageManager.NameNotFoundException;
22 |
23 | import com.leonwang.app.chinashop.R;
24 |
25 |
26 | /**
27 | * Android通用工具方法
28 | * @author LeonWang
29 | * @version 1.0
30 | * @created 2016-9-19
31 | */
32 | public class CommonUtils
33 | {
34 |
35 | /**
36 | * 获取系统版本名称
37 | */
38 | public static String getVersionName(Context context)//获取版本号
39 | {
40 | try {
41 | PackageInfo pi=context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
42 | return pi.versionName;
43 | } catch (NameNotFoundException e) {
44 | e.printStackTrace();
45 | return context.getString(R.string.versionname_unknown);
46 | }
47 | }
48 | /**
49 | * 获取系统版本号
50 | * @param context
51 | * @return
52 | */
53 | public static int getVersionCode(Context context)//获取版本号(内部识别号)
54 | {
55 | try {
56 | PackageInfo pi=context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
57 | return pi.versionCode;
58 | } catch (NameNotFoundException e) {
59 | // TODO Auto-generated catch block
60 | e.printStackTrace();
61 | return 0;
62 | }
63 | }
64 |
65 | /**
66 | * 获取线程堆栈信息
67 | * @return
68 | */
69 | public static StackTraceElement getCallerStackTraceElement() {
70 | return Thread.currentThread().getStackTrace()[4];
71 | }
72 | public static StackTraceElement getCurrentStackTraceElement() {
73 | return Thread.currentThread().getStackTrace()[3];
74 | }
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/DensityUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.annotation.TargetApi;
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.graphics.Point;
7 | import android.os.Build;
8 | import android.util.DisplayMetrics;
9 | import android.view.Display;
10 | import android.view.WindowManager;
11 |
12 | /**
13 | * dp->px && px->dp
14 | */
15 | public class DensityUtil {
16 |
17 | private static int[] deviceWidthHeight = new int[2];
18 | public static int[] getDeviceInfo(Context context) {
19 | if ((deviceWidthHeight[0] == 0) && (deviceWidthHeight[1] == 0)) {
20 | DisplayMetrics metrics = new DisplayMetrics();
21 | ((Activity) context).getWindowManager().getDefaultDisplay()
22 | .getMetrics(metrics);
23 |
24 | deviceWidthHeight[0] = metrics.widthPixels;
25 | deviceWidthHeight[1] = metrics.heightPixels;
26 | }
27 | return deviceWidthHeight;
28 | }
29 | /**
30 | *
31 | * @param context 上下文
32 | * @param dpValue dp数值
33 | * @return dp to px
34 | */
35 | public static int dip2px(Context context, float dpValue) {
36 | final float scale = context.getResources().getDisplayMetrics().density;
37 | return (int) (dpValue * scale + 0.5f);
38 |
39 | }
40 | /**
41 | * 获取屏幕尺寸
42 | */
43 | @SuppressWarnings("deprecation")
44 | @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
45 | public static Point getScreenSize(Context context){
46 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
47 | Display display = windowManager.getDefaultDisplay();
48 | if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR2){
49 | return new Point(display.getWidth(), display.getHeight());
50 | }else{
51 | Point point = new Point();
52 | display.getSize(point);
53 | return point;
54 | }
55 | }
56 | /**
57 | *
58 | * @param context 上下文
59 | * @param pxValue px的数值
60 | * @return px to dp
61 | */
62 | public static int px2dip(Context context, float pxValue) {
63 | final float scale = context.getResources().getDisplayMetrics().density;
64 | return (int) (pxValue / scale + 0.5f);
65 |
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/GpsUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.content.Context;
4 | import android.util.Log;
5 |
6 | import com.baidu.location.BDLocationListener;
7 | import com.baidu.location.LocationClient;
8 | import com.baidu.location.LocationClientOption;
9 |
10 | public class GpsUtil {
11 |
12 | private LocationClient mLocationClient;
13 | private Context context = null;
14 |
15 | /**
16 | * 初始化
17 | */
18 | public GpsUtil(Context ctx, BDLocationListener locationListener) {
19 | context = ctx;
20 | try {
21 | mLocationClient = new LocationClient(context.getApplicationContext());
22 | mLocationClient.registerLocationListener(locationListener); //注册监听函数
23 | initLocation();
24 | mLocationClient.start();
25 | } catch (Exception e) {
26 | Log.e("GpsUtil error : ", e.getMessage(), e);
27 | }
28 | }
29 |
30 | public void stop() {
31 | mLocationClient.stop();
32 | }
33 |
34 | public void start() {
35 | mLocationClient.start();
36 | }
37 |
38 | private void initLocation() {
39 | LocationClientOption option = new LocationClientOption();
40 | option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy
41 | );//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
42 | //option.setCoorType("bd09ll");//可选,默认gcj02,设置返回的定位结果坐标系
43 | //int span=1000;
44 | //option.setScanSpan(span);//可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的
45 | option.setIsNeedAddress(true);//可选,设置是否需要地址信息,默认不需要
46 | //option.setOpenGps(true);//可选,默认false,设置是否使用gps
47 | //option.setLocationNotify(true);//可选,默认false,设置是否当gps有效时按照1S1次频率输出GPS结果
48 | //option.setIsNeedLocationDescribe(true);//可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”
49 | //option.setIsNeedLocationPoiList(true);//可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到
50 | option.setIgnoreKillProcess(false);//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
51 | option.SetIgnoreCacheException(true);//可选,默认false,设置是否收集CRASH信息,默认收集
52 | option.setEnableSimulateGps(false);//可选,默认false,设置是否需要过滤gps仿真结果,默认需要
53 | mLocationClient.setLocOption(option);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/JsonUtils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.JsonObject;
5 | import com.google.gson.JsonSyntaxException;
6 |
7 | import java.lang.reflect.Type;
8 |
9 | /**
10 | * 当前类注释:json转换工具类
11 | * Author :LeonWang
12 | * Created 2016/9/120.09:52
13 | * Description:
14 | * E-mail:lijiawangjun@gmail.com
15 | */
16 | public class JsonUtils {
17 |
18 | private static Gson mGson = new Gson();
19 |
20 | /**
21 | * 将对象准换为json字符串
22 | * @param object
23 | * @param
24 | * @return
25 | */
26 | public static String serialize(T object) {
27 | return mGson.toJson(object);
28 | }
29 |
30 | /**
31 | * 将json字符串转换为对象
32 | * @param json
33 | * @param clz
34 | * @param
35 | * @return
36 | */
37 | public static T deserialize(String json, Class clz) throws JsonSyntaxException {
38 | return mGson.fromJson(json, clz);
39 | }
40 |
41 | /**
42 | * 将json对象转换为实体对象
43 | * @param json
44 | * @param clz
45 | * @param
46 | * @return
47 | * @throws JsonSyntaxException
48 | */
49 | public static T deserialize(JsonObject json, Class clz) throws JsonSyntaxException {
50 | return mGson.fromJson(json, clz);
51 | }
52 |
53 | /**
54 | * 将json字符串转换为对象
55 | * @param json
56 | * @param type
57 | * @param
58 | * @return
59 | */
60 | public static T deserialize(String json, Type type) throws JsonSyntaxException {
61 | return mGson.fromJson(json, type);
62 | }
63 |
64 |
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/LayoutHelper.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Color;
5 | import android.support.v7.widget.GridLayoutManager;
6 | import android.support.v7.widget.LinearLayoutManager;
7 | import android.support.v7.widget.StaggeredGridLayoutManager;
8 |
9 | import com.leonwang.app.chinashop.R;
10 | import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
11 |
12 | /**
13 | * Created by marno on 2016/6/7/11:23.
14 | */
15 | public class LayoutHelper {
16 |
17 | public static LinearLayoutManager getLinearLayout(Context context) {
18 | return new LinearLayoutManager(context);
19 | }
20 |
21 |
22 | public static GridLayoutManager getGridLayout(Context context, int count) {
23 | return new GridLayoutManager(context, count);
24 | }
25 |
26 | public static StaggeredGridLayoutManager getVerticalStagLayout() {
27 | return new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
28 | }
29 |
30 |
31 | public static HorizontalDividerItemDecoration getHorizontalDivider_5(Context context) {
32 | return new HorizontalDividerItemDecoration.Builder(context)
33 | .color(Color.WHITE)
34 | .sizeResId(R.dimen.five)
35 | .build();
36 | }
37 |
38 | public static HorizontalDividerItemDecoration getHorizontalDivider_6(Context context) {
39 | return new HorizontalDividerItemDecoration.Builder(context)
40 | .color(Color.parseColor("#f5f5f5"))
41 | .sizeResId(R.dimen.eight)
42 | .build();
43 | }
44 |
45 | public static HorizontalDividerItemDecoration getHorizontalDividerTranslate(Context context) {
46 | return new HorizontalDividerItemDecoration.Builder(context)
47 | .color(Color.TRANSPARENT)
48 | .sizeResId(R.dimen.nine)
49 | .build();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/MathUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.leonwang.app.chinashop.utils;
18 |
19 | /**
20 | * LeonWang
21 | */
22 | public class MathUtils {
23 |
24 | private MathUtils() { }
25 |
26 | public static float constrain(float min, float max, float v) {
27 | return Math.max(min, Math.min(max, v));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/NetworkUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 |
7 | public class NetworkUtil {
8 |
9 | @SuppressWarnings("static-access")
10 | public static boolean checkWifi(Context ctx) {
11 | boolean isWifiConnect = true;
12 | ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);
13 |
14 | //check the networkInfos numbers
15 | NetworkInfo[] networkInfos = cm.getAllNetworkInfo();
16 | for (int i = 0; i < networkInfos.length; i++) {
17 | if (networkInfos[i].getState() == NetworkInfo.State.CONNECTED) {
18 | if (networkInfos[i].getType() == cm.TYPE_MOBILE) {
19 | isWifiConnect = false;
20 | }
21 | if (networkInfos[i].getType() == cm.TYPE_WIFI) {
22 | isWifiConnect = true;
23 | }
24 | }
25 | }
26 | return isWifiConnect;
27 | }
28 |
29 | public static boolean checkNetwork(Context ctx) {
30 | ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);
31 |
32 | NetworkInfo[] networkInfos = cm.getAllNetworkInfo();
33 | for (int i = 0; i < networkInfos.length; i++) {
34 | if (networkInfos[i].getState() == NetworkInfo.State.CONNECTED) {
35 | return true;
36 | }
37 | }
38 |
39 | return false;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/PermissionUtils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | /**
4 | * 当前类注释:gps定位权限
5 | * Author :LeonWang
6 | * Created 2016/9/30.12:37
7 | * Description:
8 | * E-mail:lijiawangjun@gmail.com
9 | */
10 |
11 | public class PermissionUtils {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/ScreenUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.content.Context;
4 | import android.util.TypedValue;
5 | import android.view.WindowManager;
6 |
7 |
8 | public final class ScreenUtil {
9 |
10 | public static int getScreenWidth(Context context) {
11 | WindowManager wm = (WindowManager) context
12 | .getSystemService(Context.WINDOW_SERVICE);
13 | return wm.getDefaultDisplay().getWidth();
14 | }
15 |
16 |
17 | public static int getScreenHeight(Context context) {
18 | WindowManager wm = (WindowManager) context
19 | .getSystemService(Context.WINDOW_SERVICE);
20 | return wm.getDefaultDisplay().getHeight();
21 | }
22 |
23 | public static int Dp2Px(Context context, float dp) {
24 | final float scale = context.getResources().getDisplayMetrics().density;
25 | return (int) (dp * scale + 0.5f);
26 | }
27 |
28 | /**
29 | * 将px值转换为dip或dp值,保证尺寸大小不变
30 | *
31 | * @param pxValue
32 | * @param scale
33 | * (DisplayMetrics类中属性density)
34 | * @return
35 | */
36 | public static int px2dip(Context context, float pxValue) {
37 | final float scale = context.getResources().getDisplayMetrics().density;
38 | return (int) (pxValue / scale + 0.5f);
39 | }
40 |
41 | /**
42 | * 获得状态栏的高度
43 | *
44 | * @param context
45 | * @return
46 | */
47 | public static int getStatusBarHeight(Context context) {
48 | int result = 0;
49 | int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
50 | if (resourceId > 0) {
51 | result = context.getResources().getDimensionPixelSize(resourceId);
52 | }
53 | return result;
54 | }
55 |
56 | public static int getSp(Context context, float value) {
57 | return (int) TypedValue
58 | .applyDimension(TypedValue.COMPLEX_UNIT_SP, value, context.getResources()
59 | .getDisplayMetrics());
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/StringUtils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | /**
4 | * author zaaach on 2016/1/26.
5 | */
6 | public class StringUtils {
7 | /**
8 | * 提取出城市或者县
9 | * @param city
10 | * @param district
11 | * @return
12 | */
13 | public static String extractLocation(final String city, final String district){
14 | return district.contains("县") ? district.substring(0, district.length() - 1) : city.substring(0, city.length() - 1);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/TextUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | /**
4 | * Created by ghbha on 2016/5/9.
5 | */
6 | public class TextUtil {
7 | public static String getFormatArea(String areaName) {
8 | if (areaName.length() > 2 && areaName.contains("县")) {
9 | areaName = areaName.replace("县", "");
10 | } else if (areaName.contains("市")) {
11 | areaName = areaName.replace("市", "");
12 | } else if (areaName.contains("新区")) {
13 | areaName = areaName.replace("新区","");
14 | } else if (areaName.contains("区")) {
15 | areaName = areaName.replace("区","");
16 | }
17 | return areaName;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/ToastUtils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 | import android.content.Context;
4 | import android.os.Handler;
5 | import android.widget.Toast;
6 |
7 | /**
8 | * 当前类注释:toast工具类
9 | * Author :LeonWang
10 | * Created 2016/9/27.10:50
11 | * Description:
12 | * 问题:同时显示多个Toast信息提示框,会放在队列中,等前一个Toast关闭后才会显示下一个Toast。
13 | * 原因:Toast是Android用来显示信息的一种机制,跟Dialog不一样的是没有焦点,过一定的时间会自动消失
14 | * 解决方案:为了解决解决Toast重复显示问题,每次创建Toast我们先做下判断,如果有Toast显示,直接改变Toast里面的文字即可
15 | *
16 | * E-mail:lijiawangjun@gmail.com
17 | */
18 |
19 | public class ToastUtils {
20 | private static Toast mToast;
21 | private static Handler mHandler = new Handler();
22 |
23 |
24 | private static Runnable runnable = new Runnable() {
25 | @Override
26 | public void run() {
27 | if(mToast!=null) {
28 | mToast.cancel();
29 | }
30 | }
31 | };
32 |
33 | /**
34 | *
35 | * @param context 上下文对象
36 | * @param text 提示信息
37 | * @param duration 显示时间
38 | */
39 | public synchronized static void showToast(Context context, String text, int duration){
40 | mHandler.removeCallbacks(runnable);
41 | if(mToast == null){//Toast第一次使用,初始化
42 | //你也可以自定义Toast的布局
43 | mToast = Toast.makeText(context,text,duration);
44 | mToast.show();
45 | }else{
46 | mToast.setText(text);
47 | }
48 | mHandler.postDelayed(runnable,1000);
49 | }
50 |
51 | public static void showToast(Context context,String text){
52 | showToast(context, text, Toast.LENGTH_LONG);
53 | }
54 |
55 | public static void showToast(Context context,int resId){
56 | String text = context.getResources().getString(resId);
57 | showToast(context,text,Toast.LENGTH_LONG);
58 | }
59 |
60 | public static void showToast(Context context,int resId,int duration){
61 | String text = context.getResources().getString(resId);
62 | showToast(context,text,duration);
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/utils/WeatherIconUtil.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.utils;
2 |
3 |
4 | import com.leonwang.app.chinashop.R;
5 |
6 | /**
7 | * Created by ghbha on 2016/5/15.
8 | */
9 | public class WeatherIconUtil {
10 |
11 | public static int getWeatherIconID(String weatherCondition) {
12 | if (weatherCondition.equals("晴")) {
13 | return R.drawable.ic_ziwaixian_white;
14 | }
15 | if (weatherCondition.equals("阴")) {
16 | return R.drawable.ic_overcast;
17 | }
18 | if (weatherCondition.equals("多云")) {
19 | return R.drawable.ic_cloudy;
20 | }
21 | if (weatherCondition.equals("雾")) {
22 | return R.drawable.ic_fog;
23 | }
24 | if (weatherCondition.equals("小雨")) {
25 | return R.drawable.ic_xiaoyu;
26 | }
27 | if (weatherCondition.equals("小雪")) {
28 | return R.drawable.ic_xiaoxue;
29 | }
30 | if (weatherCondition.equals("中雨")) {
31 | return R.drawable.ic_zhongyu;
32 | }
33 | if (weatherCondition.equals("阵雨")) {
34 | return R.drawable.ic_baoyu;
35 | }
36 | if (weatherCondition.equals("雷阵雨")) {
37 | return R.drawable.ic_leizhenyu;
38 | }
39 | if (weatherCondition.equals("阵雪")) {
40 | return R.drawable.ic_zhenxue;
41 | }
42 | if (weatherCondition.equals("中雪")) {
43 | return R.drawable.ic_zhongxue;
44 | }
45 | if (weatherCondition.equals("大雪")) {
46 | return R.drawable.ic_daxue;
47 | }
48 | if (weatherCondition.equals("暴雪")) {
49 | return R.drawable.ic_baoxue;
50 | }
51 | if (weatherCondition.equals("雨夹雪")) {
52 | return R.drawable.ic_yujiaxue;
53 | }
54 | if (weatherCondition.equals("霾") || weatherCondition.equals("浮尘") || weatherCondition.equals("扬沙")) {
55 | return R.drawable.ic_mai;
56 | }
57 | if (weatherCondition.contains("雷")) {
58 | return R.drawable.ic_cloudy;
59 | }
60 | return R.drawable.ic_dayu;
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/MSwipeRefreshLayout.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget;
2 |
3 | import android.content.Context;
4 | import android.support.v4.widget.SwipeRefreshLayout;
5 | import android.util.AttributeSet;
6 |
7 | /**
8 | * Author :LeonWang
9 | *
10 | * Created 2016/9/26.15:03
11 | *
12 | * 描述:继承{@link SwipeRefreshLayout},解决页面初始化立即刷新问题
13 | */
14 |
15 | public class MSwipeRefreshLayout extends SwipeRefreshLayout {
16 |
17 | private boolean mMeasured;
18 | private boolean mPreMeasureRefreshing;
19 |
20 | public MSwipeRefreshLayout(Context context) {
21 | this(context, null);
22 | }
23 |
24 | public MSwipeRefreshLayout(Context context, AttributeSet attrs) {
25 | super(context, attrs);
26 | }
27 |
28 | @Override
29 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
30 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
31 | if (!mMeasured) {
32 | mMeasured = true;
33 | setRefreshing(mPreMeasureRefreshing);
34 | }
35 | }
36 |
37 | @Override
38 | public void setRefreshing(boolean refreshing) {
39 | if (mMeasured) {
40 | super.setRefreshing(refreshing);
41 | } else {
42 | mPreMeasureRefreshing = refreshing;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/MyListView.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.ListView;
6 |
7 | /**
8 | * Created by ghbha on 2016/5/16.
9 | */
10 | public class MyListView extends ListView {
11 | public MyListView(Context context) {
12 | super(context);
13 | }
14 |
15 | public MyListView(Context context, AttributeSet attrs) {
16 | super(context, attrs);
17 | }
18 |
19 | public MyListView(Context context, AttributeSet attrs, int defStyleAttr) {
20 | super(context, attrs, defStyleAttr);
21 | }
22 |
23 | @Override
24 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
25 | int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
26 | MeasureSpec.AT_MOST);
27 | super.onMeasure(widthMeasureSpec, expandSpec);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/PinyinUtils.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget;
2 |
3 | import android.text.TextUtils;
4 |
5 | import java.util.regex.Pattern;
6 |
7 | /**
8 | * author zaaach on 2016/1/28.
9 | */
10 | public class PinyinUtils {
11 | /**
12 | * 获取拼音的首字母(大写)
13 | * @param pinyin
14 | * @return
15 | */
16 | public static String getFirstLetter(final String pinyin){
17 | if (TextUtils.isEmpty(pinyin)) return "定位";
18 | String c = pinyin.substring(0, 1);
19 | Pattern pattern = Pattern.compile("^[A-Za-z]+$");
20 | if (pattern.matcher(c).matches()){
21 | return c.toUpperCase();
22 | } else if ("0".equals(c)){
23 | return "定位";
24 | } else if ("1".equals(c)){
25 | return "热门";
26 | }
27 | return "定位";
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/WrapHeightGridView.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.GridView;
6 |
7 | /**
8 | * author zaaach on 2015/1/26.
9 | */
10 | public class WrapHeightGridView extends GridView {
11 | public WrapHeightGridView(Context context) {
12 | this(context, null);
13 | }
14 |
15 | public WrapHeightGridView(Context context, AttributeSet attrs) {
16 | this(context, attrs, 0);
17 | }
18 |
19 | public WrapHeightGridView(Context context, AttributeSet attrs, int defStyleAttr) {
20 | super(context, attrs, defStyleAttr);
21 | }
22 |
23 | @Override
24 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
25 | int heightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
26 | super.onMeasure(widthMeasureSpec, heightSpec);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/weather/BaseLine.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget.weather;
2 |
3 | import java.util.Random;
4 |
5 | /**
6 | * Created by ghbha on 2016/5/16.
7 | */
8 | public abstract class BaseLine {
9 |
10 | public BaseLine(int maxX, int maxY) {
11 | this.maxX = maxX;
12 | this.maxY = maxY;
13 | alpha = alpha + random.nextInt(115);
14 | initRandom();
15 | }
16 |
17 | protected abstract void resetRandom();
18 |
19 | protected abstract void initRandom();
20 |
21 | protected abstract void rain();
22 |
23 | protected abstract boolean outOfBounds();
24 |
25 | public int getStartX() {
26 | return startX;
27 | }
28 |
29 | public BaseLine setStartX(int startX) {
30 | this.startX = startX;
31 | return this;
32 | }
33 |
34 | public int getStartY() {
35 | return startY;
36 | }
37 |
38 | public BaseLine setStartY(int startY) {
39 | this.startY = startY;
40 | return this;
41 | }
42 |
43 | public int getStopX() {
44 | return stopX;
45 | }
46 |
47 | public BaseLine setStopX(int stopX) {
48 | this.stopX = stopX;
49 | return this;
50 | }
51 |
52 | public int getStopY() {
53 | return stopY;
54 | }
55 |
56 | public BaseLine setStopY(int stopY) {
57 | this.stopY = stopY;
58 | return this;
59 | }
60 |
61 | public int getAlpha() {
62 | return alpha;
63 | }
64 |
65 | ////////////////////////////////////////////////////
66 | protected Random random = new Random();
67 | protected int alpha = 100;
68 | protected int startX;
69 | protected int startY;
70 | protected int stopX;
71 | protected int stopY;
72 | protected int deltaX = 6;
73 | protected int deltaY = 10;
74 | protected int maxX; //x最大范围
75 | protected int maxY; //y最大范围
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/weather/FogView.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget.weather;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.graphics.Paint;
7 | import android.graphics.RectF;
8 | import android.view.SurfaceHolder;
9 |
10 |
11 | /**
12 | * Created by ghbha on 2016/5/16.
13 | */
14 | public class FogView extends BaseAnimView {
15 |
16 | public FogView(Context context, int backColor) {
17 | super(context,backColor);
18 | }
19 |
20 | @Override
21 | protected void init() {
22 | super.init();
23 | paint = new Paint();
24 | paint.setStrokeWidth(getFitSize(3));
25 | paint.setAntiAlias(true);
26 | paint.setColor(Color.WHITE);
27 |
28 | paint.setAlpha(70);
29 | }
30 |
31 | @Override
32 | protected void drawSub(Canvas canvas) {
33 | if (radius > MAX) {
34 | deltaRadius = -deltaRadius;
35 | }
36 | if (radius < MIN) {
37 | deltaRadius = -deltaRadius;
38 | }
39 |
40 | RectF rect1 = new RectF(-radius, -radius, radius, radius);
41 | RectF rect2 = new RectF(windowWidth - radius, windowHeight - radius, windowWidth + radius, windowHeight + radius);
42 |
43 | canvas.drawArc(rect1, 0, 360, false, paint);
44 | canvas.drawArc(rect2, 0, 360, false, paint);
45 | }
46 |
47 | @Override
48 | protected void reset() {
49 | radius = MIN;
50 | }
51 |
52 | @Override
53 | protected void animLogic() {
54 | radius += deltaRadius;
55 | }
56 |
57 |
58 | @Override
59 | protected int sleepTime() {
60 | return 50;
61 | }
62 |
63 |
64 | @Override
65 | public void surfaceCreated(SurfaceHolder holder) {
66 | startAnim();
67 | }
68 |
69 | @Override
70 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
71 |
72 | }
73 |
74 | @Override
75 | public void surfaceDestroyed(SurfaceHolder holder) {
76 |
77 | }
78 |
79 | @Override
80 | public void run() {
81 | doLogic();
82 | }
83 |
84 | ///////////////////////////////////////////////////////
85 | Paint paint;
86 | //圆最小半径
87 | private float MIN = getFitSize(1080);
88 | //圆最大半径
89 | private float MAX = MIN + getFitSize(80);
90 | //圆半径
91 | private float radius = MIN;
92 | private int deltaRadius = 1;
93 | }
94 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/weather/HazeLine.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget.weather;
2 |
3 | /**
4 | * Created by ghbha on 2016/5/16.
5 | */
6 | public class HazeLine extends BaseLine {
7 |
8 | public HazeLine(int maxX, int maxY) {
9 | super(maxX, maxY);
10 | }
11 |
12 | @Override
13 | protected void resetRandom() {
14 | startX = startX - maxX;
15 | }
16 |
17 | @Override
18 | protected void initRandom() {
19 | deltaX = 1 + random.nextInt(5);
20 | startX = random.nextInt(maxX);
21 | startY = random.nextInt(maxY);
22 | stopX = startX + deltaX;
23 | }
24 |
25 | public void rain() {
26 | if (outOfBounds())
27 | resetRandom();
28 | startX += deltaX;
29 | stopX += deltaX;
30 | }
31 |
32 | @Override
33 | protected boolean outOfBounds() {
34 | if (getStartX() >= maxX) {
35 | return true;
36 | }
37 | return false;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/weather/RainOrSnowLine.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget.weather;
2 |
3 | /**
4 | * Created by ghbha on 2016/5/16.
5 | */
6 | public class RainOrSnowLine extends BaseLine {
7 |
8 | public RainOrSnowLine(int maxX, int maxY) {
9 | super(maxX, maxY);
10 | }
11 |
12 | @Override
13 | public void initRandom() {
14 | deltaY = 20;
15 | stopX = startX = random.nextInt(maxX);
16 | startY = random.nextInt(maxY);
17 | stopY = startY + 20;
18 | }
19 |
20 | @Override
21 | public void resetRandom() {
22 | startY = startY - maxY;
23 | stopY = startY + 20;
24 | }
25 |
26 | @Override
27 | public void rain() {
28 | if (outOfBounds())
29 | resetRandom();
30 | startY += deltaY;
31 | stopY += deltaY;
32 | }
33 |
34 | @Override
35 | protected boolean outOfBounds() {
36 | if (getStartY() >= maxY) {
37 | return true;
38 | }
39 | return false;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/leonwang/app/chinashop/widget/weather/Star.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop.widget.weather;
2 |
3 | import java.util.Random;
4 |
5 | /**
6 | * Created by ghbha on 2016/5/16.
7 | */
8 | public class Star {
9 |
10 | public Star(int maxX, int maxY) {
11 | this.x = random.nextInt(maxX);
12 | this.y = random.nextInt(maxY);
13 | this.radius = 2 + random.nextInt(2);
14 | currentAlpha = minAlpha + random.nextInt(110);
15 | }
16 |
17 |
18 | public void shine() {
19 | if (outOfBounds())
20 | alphaDelta = -alphaDelta;
21 | currentAlpha = currentAlpha + alphaDelta;
22 | }
23 |
24 | public boolean outOfBounds() {
25 | if (currentAlpha >= maxAlpha || currentAlpha < minAlpha) {
26 | return true;
27 | }
28 | return false;
29 | }
30 |
31 | public int getCurrentAlpha() {
32 | return currentAlpha;
33 | }
34 |
35 | public int getX() {
36 | return x;
37 | }
38 |
39 | public void setX(int x) {
40 | this.x = x;
41 | }
42 |
43 | public int getY() {
44 | return y;
45 | }
46 |
47 | public void setY(int y) {
48 | this.y = y;
49 | }
50 |
51 | public int getRadius() {
52 | return radius;
53 | }
54 |
55 | /////////////////////////////////////////////////////////////////
56 | protected int x; //x最大范围
57 | protected int y; //y最大范围
58 | protected Random random = new Random();
59 | private int radius = 4;
60 | private int minAlpha = 30;
61 | private int maxAlpha = 140;
62 | private int currentAlpha = minAlpha;
63 | private int alphaDelta = 2;
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_close_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_close_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_open_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_open_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_left_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_left_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_right_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_right_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_arrow_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/ic_arrow_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_centa_square_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/ic_centa_square_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_table_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/ic_table_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/loading_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/loading_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/progress_outer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/progress_outer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/zy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/zy.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_zy_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxhdpi/ic_zy_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_about_change_log.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_about_change_log.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_about_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_about_support.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_add_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_add_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_baoxue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_baoxue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_baoyu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_baoyu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_chuanyizhishu_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_chuanyizhishu_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_cloudy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_cloudy.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_cloudy_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_cloudy_night.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_alipay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_alipay.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_contact.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_donate.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_email.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_notice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_notice.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_qqgroup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_qqgroup.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_contact_weibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_weibo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_daxue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_daxue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_dayu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_dayu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_dialog_select_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_dialog_select_pic.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_about.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_check_update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_check_update.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_contact.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_help.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_manage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_manage.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_setting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_fog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_fog.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_gantanhao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_gantanhao.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_leizhenyu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_leizhenyu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_liangshaizhishu_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_liangshaizhishu_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_locate_city.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_locate_city.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_mai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_mai.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_match.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_match.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_na.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_na.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_notification_alarm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_notification_alarm.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_overcast.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_overcast.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_rectangle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_rectangle.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_right_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_right_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings_animation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_animation.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings_custom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_custom.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings_houtai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_houtai.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings_others.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_others.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings_widget.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_widget.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_sun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_sun.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_sun_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_sun_night.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_time_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_time_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_unknow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_unknow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_weather_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_weather_tip.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_xiaoxue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_xiaoxue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_xiaoyu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_xiaoyu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_xichezhishu_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_xichezhishu_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_yes_animation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_yes_animation.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_yujiaxue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_yujiaxue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_yundongzhishu_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_yundongzhishu_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_zhenxue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_zhenxue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_zhongxue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_zhongxue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_zhongyu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_zhongyu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_ziwaixian_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_ziwaixian_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/nav_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/nav_night.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/widget_big_clock_simple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_big_clock_simple.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/widget_clock_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_clock_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/widget_clock_simple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_clock_simple.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/widget_clock_week.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_clock_week.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/widget_no_clock_simple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_no_clock_simple.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/corner_btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | -
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | -
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/custom_progress.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 | -
20 |
26 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_clear.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_voice.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chevron_right_gray_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_file_download.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/item_table_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/line_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/line_button_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/line_button_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mask_news_detail_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/overlay_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_bar_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 | -
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_dialog_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_horizontal_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | -
20 |
22 |
23 |
24 |
25 |
26 | -
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 | -
38 |
39 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/search_box_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_rectangle_f0.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_lol_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
14 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
29 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_newsdetails.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
18 |
27 |
28 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/arrow_table.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_developer.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_news.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_news_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_video_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_zhihu.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_city_listview.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
26 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_hot_city_gridview.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_living_index_simple.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
23 |
24 |
30 |
31 |
40 |
41 |
42 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_search_result_listview.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_swipe_def.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_swipe_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_videos.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
20 |
25 |
26 |
31 |
32 |
40 |
41 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_custom_load.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
20 |
21 |
30 |
31 |
32 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
14 |
15 |
22 |
23 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_special_custom_load.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
21 |
22 |
31 |
32 |
33 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_toolbar.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_foot_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/opt_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/sun_rise.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
21 |
22 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/swiperecyclerview.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_hot_city.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_no_search_result.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
21 |
22 |
36 |
37 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhishu.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
25 |
26 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/happyreader_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xhdpi/happyreader_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_locate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xhdpi/ic_locate.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xhdpi/ic_search.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_search_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xhdpi/ic_search_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/toolbar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xhdpi/toolbar_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/main_icon_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xxxhdpi/main_icon_code.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/main_icon_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xxxhdpi/main_icon_news.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/main_icon_vedio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xxxhdpi/main_icon_vedio.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/main_icon_zhihu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/mipmap-xxxhdpi/main_icon_zhihu.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v19/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
17 |
18 |
19 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 数据加载中,请稍后...
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 | @color/progress_bar_unfinished
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/test/java/com/leonwang/app/chinashop/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.leonwang.app.chinashop;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/weiyue.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/weiyue.jks
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | mavenCentral()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:2.2.0'
10 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
11 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 |
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23"
6 |
7 | defaultConfig {
8 | minSdkVersion 14
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | testCompile 'junit:junit:4.12'
24 | compile 'com.android.support:appcompat-v7:23.+'
25 | }
26 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\android_sdk\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/androidTest/java/tv/danmaku/ijk/media/player/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package tv.danmaku.ijk.media.player;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/ISurfaceTextureHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player;
18 |
19 | import android.graphics.SurfaceTexture;
20 |
21 | public interface ISurfaceTextureHolder {
22 | void setSurfaceTexture(SurfaceTexture surfaceTexture);
23 |
24 | SurfaceTexture getSurfaceTexture();
25 |
26 | void setSurfaceTextureHost(ISurfaceTextureHost surfaceTextureHost);
27 | }
28 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/ISurfaceTextureHost.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player;
18 |
19 | import android.graphics.SurfaceTexture;
20 |
21 | public interface ISurfaceTextureHost {
22 | void releaseSurfaceTexture(SurfaceTexture surfaceTexture);
23 | }
24 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/IjkLibLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013-2014 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player;
18 |
19 | public interface IjkLibLoader {
20 | void loadLibrary(String libName) throws UnsatisfiedLinkError,
21 | SecurityException;
22 | }
23 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/MediaInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013-2014 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player;
18 |
19 | public class MediaInfo {
20 | public String mMediaPlayerName;
21 |
22 | public String mVideoDecoder;
23 | public String mVideoDecoderImpl;
24 |
25 | public String mAudioDecoder;
26 | public String mAudioDecoderImpl;
27 |
28 | public IjkMediaMeta mMeta;
29 | }
30 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/annotations/AccessedByNative.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013-2014 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.annotations;
18 |
19 | import java.lang.annotation.ElementType;
20 | import java.lang.annotation.Retention;
21 | import java.lang.annotation.RetentionPolicy;
22 | import java.lang.annotation.Target;
23 |
24 | /**
25 | * is used by the JNI generator to create the necessary JNI
26 | * bindings and expose this method to native code.
27 | */
28 | @Target(ElementType.FIELD)
29 | @Retention(RetentionPolicy.CLASS)
30 | public @interface AccessedByNative {
31 | }
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/annotations/CalledByNative.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013-2014 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.annotations;
18 |
19 | import java.lang.annotation.ElementType;
20 | import java.lang.annotation.Retention;
21 | import java.lang.annotation.RetentionPolicy;
22 | import java.lang.annotation.Target;
23 |
24 | /**
25 | * is used by the JNI generator to create the necessary JNI
26 | * bindings and expose this method to native code.
27 | */
28 | @Target(ElementType.METHOD)
29 | @Retention(RetentionPolicy.CLASS)
30 | public @interface CalledByNative {
31 | /*
32 | * If present, tells which inner class the method belongs to.
33 | */
34 | String value() default "";
35 | }
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/exceptions/IjkMediaException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013-2014 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.exceptions;
18 |
19 | public class IjkMediaException extends Exception {
20 | private static final long serialVersionUID = 7234796519009099506L;
21 | }
22 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/ffmpeg/FFmpegApi.java:
--------------------------------------------------------------------------------
1 | package tv.danmaku.ijk.media.player.ffmpeg;
2 |
3 | public class FFmpegApi {
4 | public static native String av_base64_encode(byte in[]);
5 | }
6 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/misc/AndroidMediaFormat.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.misc;
18 |
19 | import android.annotation.TargetApi;
20 | import android.media.MediaFormat;
21 | import android.os.Build;
22 |
23 | public class AndroidMediaFormat implements IMediaFormat {
24 | private final MediaFormat mMediaFormat;
25 |
26 | public AndroidMediaFormat(MediaFormat mediaFormat) {
27 | mMediaFormat = mediaFormat;
28 | }
29 |
30 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
31 | @Override
32 | public int getInteger(String name) {
33 | if (mMediaFormat == null)
34 | return 0;
35 |
36 | return mMediaFormat.getInteger(name);
37 | }
38 |
39 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
40 | @Override
41 | public String getString(String name) {
42 | if (mMediaFormat == null)
43 | return null;
44 |
45 | return mMediaFormat.getString(name);
46 | }
47 |
48 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
49 | @Override
50 | public String toString() {
51 | StringBuilder out = new StringBuilder(128);
52 | out.append(getClass().getName());
53 | out.append('{');
54 | if (mMediaFormat != null) {
55 | out.append(mMediaFormat.toString());
56 | } else {
57 | out.append("null");
58 | }
59 | out.append('}');
60 | return out.toString();
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/misc/IMediaDataSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.misc;
18 |
19 | import java.io.IOException;
20 |
21 | @SuppressWarnings("RedundantThrows")
22 | public interface IMediaDataSource {
23 | int readAt(long position, byte[] buffer, int offset, int size) throws IOException;
24 |
25 | long getSize() throws IOException;
26 |
27 | void close() throws IOException;
28 | }
29 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/misc/IMediaFormat.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.misc;
18 |
19 | public interface IMediaFormat {
20 | // Common keys
21 | String KEY_MIME = "mime";
22 |
23 | // Video Keys
24 | String KEY_WIDTH = "width";
25 | String KEY_HEIGHT = "height";
26 |
27 | String getString(String name);
28 |
29 | int getInteger(String name);
30 | }
31 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/misc/ITrackInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.misc;
18 |
19 | public interface ITrackInfo {
20 | int MEDIA_TRACK_TYPE_AUDIO = 2;
21 | int MEDIA_TRACK_TYPE_METADATA = 5;
22 | int MEDIA_TRACK_TYPE_SUBTITLE = 4;
23 | int MEDIA_TRACK_TYPE_TIMEDTEXT = 3;
24 | int MEDIA_TRACK_TYPE_UNKNOWN = 0;
25 | int MEDIA_TRACK_TYPE_VIDEO = 1;
26 |
27 | IMediaFormat getFormat();
28 |
29 | String getLanguage();
30 |
31 | int getTrackType();
32 |
33 | String getInfoInline();
34 | }
35 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/pragma/Pragma.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package tv.danmaku.ijk.media.player.pragma;
17 |
18 | /*-
19 | * configurated by app project
20 | */
21 | public class Pragma {
22 | public static final boolean ENABLE_VERBOSE = true;
23 | }
24 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/java/tv/danmaku/ijk/media/player/widget/IMediaController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tv.danmaku.ijk.media.player.widget;
18 |
19 | import android.view.View;
20 | import android.widget.MediaController;
21 |
22 | public interface IMediaController {
23 | void hide();
24 |
25 | boolean isShowing();
26 |
27 | void setAnchorView(View view);
28 |
29 | void setEnabled(boolean enabled);
30 |
31 | void setMediaPlayer(MediaController.MediaPlayerControl player);
32 |
33 | void show(int timeout);
34 |
35 | void show();
36 |
37 | // ----------
38 | // Extends
39 | // ----------
40 | void showOnce(View view);
41 | }
42 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/arm64-v8a/libijkffmpeg.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/arm64-v8a/libijkffmpeg.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/arm64-v8a/libijkplayer.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/arm64-v8a/libijkplayer.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/arm64-v8a/libijksdl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/arm64-v8a/libijksdl.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/armeabi-v7a/libijkffmpeg.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/armeabi-v7a/libijkffmpeg.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/armeabi-v7a/libijkplayer.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/armeabi-v7a/libijkplayer.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/armeabi-v7a/libijksdl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/armeabi-v7a/libijksdl.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/armeabi/libijkffmpeg.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/armeabi/libijkffmpeg.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/armeabi/libijkplayer.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/armeabi/libijkplayer.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/armeabi/libijksdl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/armeabi/libijksdl.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/x86/libijkffmpeg.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/x86/libijkffmpeg.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/x86/libijkplayer.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/x86/libijkplayer.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/jniLibs/x86/libijksdl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/ijkplayerlibrary/src/main/jniLibs/x86/libijksdl.so
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ijkplayerLibrary
3 |
4 |
--------------------------------------------------------------------------------
/ijkplayerlibrary/src/test/java/tv/danmaku/ijk/media/player/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package tv.danmaku.ijk.media.player;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/screenshot/downloadimage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/screenshot/downloadimage.jpg
--------------------------------------------------------------------------------
/screenshot/wechat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/screenshot/wechat.jpg
--------------------------------------------------------------------------------
/screenshot/天气.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/screenshot/天气.gif
--------------------------------------------------------------------------------
/screenshot/视频.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/screenshot/视频.gif
--------------------------------------------------------------------------------
/screenshot/资讯.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/screenshot/资讯.gif
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':ijkplayerlibrary', ':superplayerlibrary'
2 |
--------------------------------------------------------------------------------
/superplayerlibrary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/superplayerlibrary/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23"
6 |
7 | defaultConfig {
8 | minSdkVersion 14
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | testCompile 'junit:junit:4.12'
24 | compile 'com.android.support:appcompat-v7:23.+'
25 | compile project(':ijkplayerlibrary')
26 | }
27 |
--------------------------------------------------------------------------------
/superplayerlibrary/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\android_sdk\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/androidTest/java/com/superplayer/library/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.superplayer.library;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/java/com/superplayer/library/SuperPlayerManage.java:
--------------------------------------------------------------------------------
1 | package com.superplayer.library;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | *
7 | * 类描述:获取唯一的视频控制器
8 | *
9 | * @author Super南仔
10 | * @time 2016-9-19
11 | */
12 | public class SuperPlayerManage {
13 | public static SuperPlayerManage videoPlayViewManage;
14 | private SuperPlayer videoPlayView;
15 |
16 | private SuperPlayerManage() {
17 |
18 | }
19 |
20 | public static SuperPlayerManage getSuperManage() {
21 | if (videoPlayViewManage == null) {
22 | videoPlayViewManage = new SuperPlayerManage();
23 | }
24 | return videoPlayViewManage;
25 | }
26 |
27 | public SuperPlayer initialize(Context context) {
28 | if (videoPlayView == null) {
29 | videoPlayView = new SuperPlayer(context);
30 | }
31 | return videoPlayView;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/java/com/superplayer/library/Test.java:
--------------------------------------------------------------------------------
1 | package com.superplayer.library;
2 |
3 | /**
4 | * Created by Administrator on 2016-09-12.
5 | */
6 | public class Test {
7 | }
8 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/java/com/superplayer/library/mediaplayer/IMediaController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Zhang Rui
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.superplayer.library.mediaplayer;
18 |
19 | import android.view.View;
20 | import android.widget.MediaController;
21 |
22 | public interface IMediaController {
23 | void hide();
24 |
25 | boolean isShowing();
26 |
27 | void setAnchorView(View view);
28 |
29 | void setEnabled(boolean enabled);
30 |
31 | void setMediaPlayer(MediaController.MediaPlayerControl player);
32 |
33 | void show(int timeout);
34 |
35 | void show();
36 |
37 | // ----------
38 | // Extends
39 | // ----------
40 | void showOnce(View view);
41 | }
42 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/java/com/superplayer/library/utils/NetUtils.java:
--------------------------------------------------------------------------------
1 | package com.superplayer.library.utils;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 | import android.telephony.TelephonyManager;
7 |
8 | /**
9 | *
10 | * 类描述:网络链接类型判断
11 | *
12 | * @author Super南仔
13 | * @time 2016-9-9
14 | */
15 | public class NetUtils {
16 |
17 | /**
18 | * 判断当前网络类型-1为未知网络0为没有网络连接1网络断开或关闭2为以太网3为WiFi4为2G5为3G6为4G
19 | */
20 | public static int getNetworkType(Context context) {
21 | ConnectivityManager connectMgr = (ConnectivityManager) context
22 | .getSystemService(Context.CONNECTIVITY_SERVICE);
23 |
24 | NetworkInfo networkInfo = connectMgr.getActiveNetworkInfo();
25 | if (networkInfo == null) {
26 | /** 没有任何网络 */
27 | return 0;
28 | }
29 | if (!networkInfo.isConnected()) {
30 | /** 网络断开或关闭 */
31 | return 1;
32 | }
33 | if (networkInfo.getType() == ConnectivityManager.TYPE_ETHERNET) {
34 | /** 以太网网络 */
35 | return 2;
36 | } else if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI) {
37 | /** wifi网络,当激活时,默认情况下,所有的数据流量将使用此连接 */
38 | return 3;
39 | } else if (networkInfo.getType() == ConnectivityManager.TYPE_MOBILE) {
40 | /** 移动数据连接,不能与连接共存,如果wifi打开,则自动关闭 */
41 | switch (networkInfo.getSubtype()) {
42 | case TelephonyManager.NETWORK_TYPE_GPRS:
43 | case TelephonyManager.NETWORK_TYPE_EDGE:
44 | case TelephonyManager.NETWORK_TYPE_CDMA:
45 | case TelephonyManager.NETWORK_TYPE_1xRTT:
46 | case TelephonyManager.NETWORK_TYPE_IDEN:
47 | /** 2G网络 */
48 | case TelephonyManager.NETWORK_TYPE_UMTS:
49 | case TelephonyManager.NETWORK_TYPE_EVDO_0:
50 | case TelephonyManager.NETWORK_TYPE_EVDO_A:
51 | case TelephonyManager.NETWORK_TYPE_HSDPA:
52 | case TelephonyManager.NETWORK_TYPE_HSUPA:
53 | case TelephonyManager.NETWORK_TYPE_HSPA:
54 | case TelephonyManager.NETWORK_TYPE_EVDO_B:
55 | case TelephonyManager.NETWORK_TYPE_EHRPD:
56 | case TelephonyManager.NETWORK_TYPE_HSPAP:
57 | /** 3G网络 */
58 | case TelephonyManager.NETWORK_TYPE_LTE:
59 | /** 4G网络 */
60 | return 4;
61 | }
62 | }
63 | /** 未知网络 */
64 | return -1;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/java/com/superplayer/library/utils/SuperPlayerUtils.java:
--------------------------------------------------------------------------------
1 | package com.superplayer.library.utils;
2 |
3 | import android.app.Activity;
4 | import android.util.DisplayMetrics;
5 |
6 | /**
7 | *
8 | * @author Super南仔
9 | * @time 2016-9-19
10 | */
11 | public class SuperPlayerUtils {
12 | /**
13 | * 得到屏幕宽度
14 | *
15 | * @return 宽度
16 | */
17 | public static int getScreenWidth(Activity activity) {
18 | DisplayMetrics dm = new DisplayMetrics();
19 | activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
20 | int screenWidth = dm.widthPixels;
21 | return screenWidth;
22 | }
23 |
24 | /**
25 | * 得到屏幕高度
26 | *
27 | * @return 高度
28 | */
29 | public static int getScreenHeight(Activity activity) {
30 | DisplayMetrics dm = new DisplayMetrics();
31 | activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
32 | int screenHeight = dm.heightPixels;
33 | return screenHeight;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_back.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_brightness_6_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_brightness_6_white_36dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_center_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_center_pause.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_center_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_center_play.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_chevron_left_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_chevron_left_white_36dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_circles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_circles.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_enlarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_enlarge.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_fullscreen_exit_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_fullscreen_exit_white_24dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_fullscreen_exit_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_fullscreen_exit_white_36dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_fullscreen_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_fullscreen_white_24dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_live_number.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_live_number.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_not_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_not_fullscreen.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_pause.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_play.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_play_circle_outline_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_play_circle_outline_white_36dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_setting.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_share.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_stop_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_stop_white_24dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_volume_off_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_volume_off_white_36dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xhdpi/ic_volume_up_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xhdpi/ic_volume_up_white_36dp.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/superplayerlibrary/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable/app_video_center_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable/bg_jky_player_continue.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/drawable/jky_player_progressbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 | -
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | -
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/layout/view_super_player.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
18 |
19 |
26 |
27 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/layout/view_super_player_control.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/layout/view_super_player_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
24 |
25 |
33 |
34 |
41 |
42 |
43 |
57 |
58 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 超级播放器
3 | 请指定播放视频的地址
4 | 出了点小问题,稍后重试
5 | 不能播放此视频
6 | 播放器不支持此设备
7 | 您正在使用移动网络播放视频\n可能产生较高流量费用
8 |
9 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/superplayerlibrary/src/test/java/com/superplayer/library/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.superplayer.library;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------