3 | *
4 | * This file is part of Meizhi
5 | *
6 | * Meizhi is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Meizhi is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with Meizhi. If not, see .
18 | */
19 |
20 | package com.looklook.xinghongfei.looklook.util;
21 |
22 | import android.content.Context;
23 | import android.content.SharedPreferences;
24 |
25 | /**
26 | * Created by drakeet on 8/16/15.
27 | */
28 | public class Once {
29 |
30 | SharedPreferences mSharedPreferences;
31 | Context mContext;
32 |
33 |
34 | public Once(Context context) {
35 | mSharedPreferences = context.getSharedPreferences("once", Context.MODE_PRIVATE);
36 | mContext = context;
37 | }
38 |
39 |
40 | public void show(String tagKey, OnceCallback callback) {
41 | boolean isSecondTime = mSharedPreferences.getBoolean(tagKey, false);
42 | if (!isSecondTime) {
43 | callback.onOnce();
44 | SharedPreferences.Editor editor = mSharedPreferences.edit();
45 | editor.putBoolean(tagKey, true);
46 | editor.apply();
47 | }
48 | }
49 |
50 |
51 | public void show(int tagKeyResId, OnceCallback callback) {
52 | show(mContext.getString(tagKeyResId), callback);
53 | }
54 |
55 |
56 | public interface OnceCallback {
57 | void onOnce();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/util/SharePreferenceUtil.java:
--------------------------------------------------------------------------------
1 | package com.looklook.xinghongfei.looklook.util;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.preference.PreferenceManager;
6 |
7 | import com.looklook.xinghongfei.looklook.R;
8 |
9 | /**
10 | * Created by 蔡小木 on 2016/3/13 0013.
11 | */
12 | public class SharePreferenceUtil {
13 |
14 | private SharePreferenceUtil() {}
15 |
16 | public static final String SHARED_PREFERENCE_NAME = "micro_reader";
17 | public static final String IMAGE_DESCRIPTION = "image_description";
18 | public static final String VIBRANT = "vibrant";
19 | public static final String MUTED = "muted";
20 | public static final String IMAGE_GET_TIME = "image_get_time";
21 | public static final String SAVED_CHANNEL = "saved_channel";
22 |
23 | public static boolean isRefreshOnlyWifi(Context context) {
24 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
25 | return sharedPreferences.getBoolean(context.getResources().getString(R.string.pre_refresh_data), false);
26 | }
27 |
28 | public static boolean isChangeThemeAuto(Context context) {
29 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
30 | return sharedPreferences.getBoolean(context.getResources().getString(R.string.pre_get_image), true);
31 | }
32 |
33 | public static boolean isImmersiveMode(Context context) {
34 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
35 | return sharedPreferences.getBoolean(context.getString(R.string.pre_status_bar), true);
36 | }
37 |
38 | public static boolean isChangeNavColor(Context context) {
39 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
40 | return sharedPreferences.getBoolean(context.getString(R.string.pre_nav_color), true);
41 | }
42 |
43 | public static boolean isUseLocalBrowser(Context context) {
44 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
45 | return sharedPreferences.getBoolean(context.getString(R.string.pre_use_local), false);
46 | }
47 |
48 | public static int getNevigationItem(Context context){
49 | SharedPreferences sharedPreferences=PreferenceManager.getDefaultSharedPreferences(context);
50 | return sharedPreferences.getInt(context.getString(R.string.nevigation_item),-1);
51 | }
52 | public static void putNevigationItem(Context context,int t){
53 | SharedPreferences sharedPreferences=PreferenceManager.getDefaultSharedPreferences(context);
54 | SharedPreferences.Editor editor=sharedPreferences.edit();
55 | editor.putInt(context.getString(R.string.nevigation_item),t);
56 | editor.commit();
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/util/Urls.java:
--------------------------------------------------------------------------------
1 | package com.looklook.xinghongfei.looklook.util;
2 |
3 | /**
4 | * Description : 接口API的URL
5 | * Author : lauren
6 | * Email : lauren.liuling@gmail.com
7 | * Blog : http://www.liuling123.com
8 | * Date : 15/12/13
9 | */
10 | public class Urls {
11 |
12 | //http://c.m.163.com/nc/article/headline/T1348647909107/0-5.html 头条
13 |
14 | public static final int PAZE_SIZE = 20;
15 |
16 | public static final String HOST = "http://c.m.163.com/";
17 | public static final String END_URL = "-" + PAZE_SIZE + ".html";
18 | public static final String END_DETAIL_URL = "/full.html";
19 | // 头条
20 | public static final String TOP_URL = HOST + "nc/article/headline/";
21 | public static final String TOP_ID = "T1348647909107";
22 | // 新闻详情
23 | public static final String NEW_DETAIL = HOST + "nc/article/";
24 |
25 | public static final String COMMON_URL = HOST + "nc/article/list/";
26 |
27 |
28 | // 图片
29 | public static final String IMAGES_URL = "http://api.laifudao.com/open/tupian.json";
30 |
31 | // 天气预报url
32 | public static final String WEATHER = "http://wthrcdn.etouch.cn/weather_mini?city=";
33 |
34 | //百度定位
35 | public static final String INTERFACE_LOCATION = "http://api.map.baidu.com/geocoder";
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/util/WebUtil.java:
--------------------------------------------------------------------------------
1 | package com.looklook.xinghongfei.looklook.util;
2 |
3 | /**
4 | * Created by 蔡小木 on 2016/3/7 0007.
5 | */
6 | public class WebUtil {
7 |
8 | private WebUtil() {
9 | }
10 |
11 | public static final String BASE_URL = "file:///android_asset/";
12 | public static final String MIME_TYPE = "text/html";
13 | public static final String ENCODING = "utf-8";
14 | public static final String FAIL_URL = "http//:daily.zhihu.com/";
15 |
16 | private static final String CSS_LINK_PATTERN = " ";
17 | private static final String NIGHT_DIV_TAG_START = "";
18 | private static final String NIGHT_DIV_TAG_END = "
";
19 |
20 | private static final String DIV_IMAGE_PLACE_HOLDER = "class=\"img-place-holder\"";
21 | private static final String DIV_IMAGE_PLACE_HOLDER_IGNORED = "class=\"img-place-holder-ignored\"";
22 |
23 | public static String buildHtmlWithCss(String html, String[] cssUrls, boolean isNightMode) {
24 | StringBuilder result = new StringBuilder();
25 | for (String cssUrl : cssUrls) {
26 | result.append(String.format(CSS_LINK_PATTERN, cssUrl));
27 | }
28 |
29 | if (isNightMode) {
30 | result.append(NIGHT_DIV_TAG_START);
31 | }
32 | result.append(html.replace(DIV_IMAGE_PLACE_HOLDER, DIV_IMAGE_PLACE_HOLDER_IGNORED));
33 | if (isNightMode) {
34 | result.append(NIGHT_DIV_TAG_END);
35 | }
36 | return result.toString();
37 | }
38 |
39 | public static String buildHtmlForIt(String content, boolean isNightMode) {
40 | StringBuilder modifiedHtml = new StringBuilder();
41 | modifiedHtml.append("" + ""
42 | + "" + "" + ""
43 | + "" + ""
44 | + ""
45 | + "" + "");
46 | modifiedHtml.append("");
51 | modifiedHtml.append(content);
52 | modifiedHtml.append("");
53 | return modifiedHtml.toString();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/util/common/UIUtils.java:
--------------------------------------------------------------------------------
1 | package com.looklook.xinghongfei.looklook.util.common;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 |
7 | import com.looklook.xinghongfei.looklook.MyApplication;
8 | import com.looklook.xinghongfei.looklook.R;
9 |
10 | /**
11 | * Author :hymanme
12 | * Email :hymanme@163.com
13 | * Created at 2015/7/27
14 | */
15 | public class UIUtils {
16 |
17 | public static Context getContext() {
18 | return MyApplication.getApplication();
19 | }
20 |
21 | /**
22 | * 页面跳转
23 | *
24 | * @param intent
25 | */
26 | public static void startActivity(Intent intent) {
27 | // 如果不在activity里去打开activity 需要指定任务栈 需要设置标签
28 | if (com.looklook.xinghongfei.looklook.activity.BaseActivity.activity == null) {
29 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
30 | getContext().startActivity(intent);
31 | } else {
32 | com.looklook.xinghongfei.looklook.activity.BaseActivity.activity.startActivity(intent);
33 | }
34 | }
35 |
36 | /**
37 | * 分享
38 | *
39 | * @param context
40 | * @param content 分享内容
41 | * @param uri 分享图片uri
42 | */
43 | public static void share(Context context, String content, Uri uri) {
44 | Intent shareIntent = new Intent();
45 | shareIntent.setAction(Intent.ACTION_SEND);
46 | if (uri != null) {
47 | shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
48 | shareIntent.setType("image/*");
49 | //当用户选择短信时使用sms_body取得文字
50 | shareIntent.putExtra("sms_body", content);
51 | } else {
52 | shareIntent.setType("text/plain");
53 | }
54 | shareIntent.putExtra(Intent.EXTRA_TEXT, content);
55 | context.startActivity(Intent.createChooser(shareIntent, context.getString(R.string.share_dialog_title)));
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/view/GridItemDividerDecoration.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.looklook.xinghongfei.looklook.view;
18 |
19 | import android.content.Context;
20 | import android.graphics.Canvas;
21 | import android.graphics.Paint;
22 | import android.support.annotation.ColorInt;
23 | import android.support.annotation.ColorRes;
24 | import android.support.annotation.DimenRes;
25 | import android.support.annotation.NonNull;
26 | import android.support.v4.content.ContextCompat;
27 | import android.support.v7.widget.RecyclerView;
28 | import android.view.View;
29 |
30 | /**
31 | * A {@link RecyclerView.ItemDecoration} which draws dividers (along the right & bottom)
32 | * for certain {@link RecyclerView.ViewHolder} types.
33 | */
34 | public class GridItemDividerDecoration extends RecyclerView.ItemDecoration {
35 |
36 |
37 | private final float dividerSize;
38 | private final Paint paint;
39 |
40 | public GridItemDividerDecoration(float dividerSize,
41 | @ColorInt int dividerColor) {
42 |
43 | this.dividerSize = dividerSize;
44 | paint = new Paint();
45 | paint.setColor(dividerColor);
46 | paint.setStyle(Paint.Style.FILL);
47 | }
48 |
49 | public GridItemDividerDecoration(@NonNull Context context,
50 | @DimenRes int dividerSizeResId,
51 | @ColorRes int dividerColorResId) {
52 | this(
53 | context.getResources().getDimensionPixelSize(dividerSizeResId),
54 | ContextCompat.getColor(context, dividerColorResId));
55 | }
56 |
57 | @Override
58 | public void onDrawOver(Canvas canvas, RecyclerView parent, RecyclerView.State state) {
59 | if (parent.isAnimating()) return;
60 |
61 | final int childCount = parent.getChildCount();
62 | final RecyclerView.LayoutManager lm = parent.getLayoutManager();
63 | for (int i = 0; i < childCount; i++) {
64 | final View child = parent.getChildAt(i);
65 | RecyclerView.ViewHolder viewHolder = parent.getChildViewHolder(child);
66 |
67 | if (requiresDivider(viewHolder)) {
68 | final int right = lm.getDecoratedRight(child);
69 | final int bottom = lm.getDecoratedBottom(child);
70 | // draw the bottom divider
71 | canvas.drawRect(lm.getDecoratedLeft(child),
72 | bottom - dividerSize,
73 | right,
74 | bottom,
75 | paint);
76 | // draw the right edge divider
77 | canvas.drawRect(right - dividerSize,
78 | lm.getDecoratedTop(child),
79 | right,
80 | bottom - dividerSize,
81 | paint);
82 | }
83 |
84 | }
85 | }
86 |
87 | private boolean requiresDivider(RecyclerView.ViewHolder viewHolder) {
88 |
89 | return true;
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/view/Pop.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.looklook.xinghongfei.looklook.view;
18 |
19 | import android.animation.Animator;
20 | import android.animation.ObjectAnimator;
21 | import android.animation.PropertyValuesHolder;
22 | import android.content.Context;
23 | import android.transition.TransitionValues;
24 | import android.transition.Visibility;
25 | import android.util.AttributeSet;
26 | import android.view.View;
27 | import android.view.ViewGroup;
28 |
29 | /**
30 | * A transition that animates the alpha, scale X & Y of a view simultaneously.
31 | */
32 | public class Pop extends Visibility {
33 |
34 | public Pop(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | }
37 |
38 | @Override
39 | public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues,
40 | TransitionValues endValues) {
41 | return ObjectAnimator.ofPropertyValuesHolder(
42 | endValues.view,
43 | PropertyValuesHolder.ofFloat(View.ALPHA, 0f, 1f),
44 | PropertyValuesHolder.ofFloat(View.SCALE_X, 0f, 1f),
45 | PropertyValuesHolder.ofFloat(View.SCALE_Y, 0f, 1f));
46 | }
47 |
48 | @Override
49 | public Animator onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues,
50 | TransitionValues endValues) {
51 | return ObjectAnimator.ofPropertyValuesHolder(
52 | endValues.view,
53 | PropertyValuesHolder.ofFloat(View.ALPHA, 1f, 0f),
54 | PropertyValuesHolder.ofFloat(View.SCALE_X, 1f, 0f),
55 | PropertyValuesHolder.ofFloat(View.SCALE_Y, 1f, 0f));
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/widget/FourThreeImageView.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.looklook.xinghongfei.looklook.widget;
18 |
19 | import android.content.Context;
20 | import android.util.AttributeSet;
21 |
22 | /**
23 | * A extension of ForegroundImageView that is always 4:3 aspect ratio.
24 | */
25 | public class FourThreeImageView extends ForegroundImageView {
26 |
27 | public FourThreeImageView(Context context, AttributeSet attrs) {
28 | super(context, attrs);
29 | }
30 |
31 | public FourThreeImageView(Context context,AttributeSet attrs,int defStyle){
32 | super(context, attrs,defStyle);
33 |
34 | }
35 |
36 | @Override
37 | protected void onMeasure(int widthSpec, int heightSpec) {
38 | int fourThreeHeight = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthSpec) * 3 / 4,
39 | MeasureSpec.EXACTLY);
40 | super.onMeasure(widthSpec, fourThreeHeight);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/widget/LiftOff.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.looklook.xinghongfei.looklook.widget;
18 |
19 | import android.animation.Animator;
20 | import android.animation.ObjectAnimator;
21 | import android.content.Context;
22 | import android.content.res.TypedArray;
23 | import android.transition.Transition;
24 | import android.transition.TransitionValues;
25 | import android.util.AttributeSet;
26 | import android.view.View;
27 | import android.view.ViewGroup;
28 |
29 | import com.looklook.xinghongfei.looklook.R;
30 |
31 |
32 | /**
33 | * A transition that animates the elevation of a View from a given value down to zero.
34 | *
35 | * Useful for creating parent↔child navigation transitions (https://www.google.com/design/spec/patterns/navigational-transitions.html#navigational-transitions-parent-to-child)
36 | * when combined with a {@link android.transition.ChangeBounds} on a shared element.
37 | */
38 | public class LiftOff extends Transition {
39 |
40 | private static final String PROPNAME_ELEVATION = "plaid:liftoff:elevation";
41 |
42 | private static final String[] transitionProperties = {
43 | PROPNAME_ELEVATION
44 | };
45 |
46 | private final float lift;
47 |
48 | public LiftOff(float lift) {
49 | this.lift = lift;
50 | }
51 |
52 | public LiftOff(Context context, AttributeSet attrs) {
53 | super(context, attrs);
54 | final TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.LiftOff);
55 | lift = ta.getDimensionPixelSize(R.styleable.LiftOff_android_elevation, 0);
56 | ta.recycle();
57 | }
58 |
59 | @Override
60 | public String[] getTransitionProperties() {
61 | return transitionProperties;
62 | }
63 |
64 | @Override
65 | public void captureStartValues(TransitionValues transitionValues) {
66 | transitionValues.values.put(PROPNAME_ELEVATION, 0f);
67 | }
68 |
69 | @Override
70 | public void captureEndValues(TransitionValues transitionValues) {
71 | transitionValues.values.put(PROPNAME_ELEVATION, lift);
72 | }
73 |
74 | @Override
75 | public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues,
76 | TransitionValues endValues) {
77 | return ObjectAnimator.ofFloat(endValues.view, View.TRANSLATION_Z, lift, 0f);
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/widget/ShotSharedEnter.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.looklook.xinghongfei.looklook.widget;
18 |
19 | import android.content.Context;
20 | import android.graphics.Rect;
21 | import android.transition.ChangeBounds;
22 | import android.transition.TransitionValues;
23 | import android.util.AttributeSet;
24 | import android.view.View;
25 |
26 | /**
27 | * Shared element transitions do not seem to like transitioning from a single view to two separate
28 | * views so we need to alter the ChangeBounds transition to compensate
29 | */
30 | public class ShotSharedEnter extends ChangeBounds {
31 |
32 | private static final String PROPNAME_BOUNDS = "android:changeBounds:bounds";
33 | private static final String PROPNAME_PARENT = "android:changeBounds:parent";
34 |
35 | public ShotSharedEnter(Context context, AttributeSet attrs) {
36 | super(context, attrs);
37 | }
38 |
39 | @Override
40 | public void captureEndValues(TransitionValues transitionValues) {
41 | super.captureEndValues(transitionValues);
42 | int width = ((View) transitionValues.values.get(PROPNAME_PARENT)).getWidth();
43 | Rect bounds = (Rect) transitionValues.values.get(PROPNAME_BOUNDS);
44 | bounds.right = width;
45 | bounds.bottom = width * 3 / 4;
46 | transitionValues.values.put(PROPNAME_BOUNDS, bounds);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/looklook/xinghongfei/looklook/widget/WrapContentLinearLayoutManager.java:
--------------------------------------------------------------------------------
1 | package com.looklook.xinghongfei.looklook.widget;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.LinearLayoutManager;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.util.AttributeSet;
7 |
8 | /**
9 | * Created by xinghongfei on 16/8/16.
10 | */
11 | public class WrapContentLinearLayoutManager extends LinearLayoutManager {
12 | public WrapContentLinearLayoutManager(Context context) {
13 | super(context);
14 | }
15 | public WrapContentLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
16 | super(context, orientation, reverseLayout);
17 | }
18 |
19 | public WrapContentLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
20 | super(context, attrs, defStyleAttr, defStyleRes);
21 | }
22 |
23 | @Override
24 | public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
25 | try {
26 | super.onLayoutChildren(recycler, state);
27 | } catch (IndexOutOfBoundsException e) {
28 | e.printStackTrace();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/trim_start_interpolator.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/app_bar_pin.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
24 |
25 | -
26 |
31 |
32 |
33 | -
34 |
39 |
40 |
41 | -
42 |
47 |
48 |
49 | -
50 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/button_frown.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/raise.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | -
22 |
26 |
27 | -
28 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/show_connection_cross.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 |
21 |
28 |
29 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/show_connection_line.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/upload_arrow_fill.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/upload_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
29 |
30 |
37 |
38 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/upload_progress_rotation.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable-hdpi/bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_color_lens_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable-hdpi/ic_color_lens_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avd_uploading.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
25 |
26 |
29 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
22 | -
23 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
23 |
24 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_uploading.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
24 |
25 |
30 |
31 |
32 |
33 |
36 |
37 |
41 |
42 |
43 |
44 |
48 |
49 |
53 |
54 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/look.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/look.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/look2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/look2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/look3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/look3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/looklookbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/looklookbg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mid_grey_ripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nav_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/nav_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/open.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/settin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/settin.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/wangyi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/wangyi.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/zhihu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/drawable/zhihu.png
--------------------------------------------------------------------------------
/app/src/main/res/interpolator/trim_end_interpolator.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/action_view_switch.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
26 |
27 |
28 |
39 |
40 |
49 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_picture.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
25 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/infinite_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/main_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 |
15 |
20 |
21 |
25 |
26 |
27 |
36 |
37 |
38 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/meizi_fragment_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
27 |
28 |
29 |
35 |
36 |
37 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/meizi_layout_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
27 |
28 |
29 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/no_connection.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/no_connection_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/posting_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/topnews_fragment_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
23 |
24 |
25 |
26 |
32 |
33 |
34 |
35 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/topnews_layout_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
27 |
28 |
32 |
33 |
44 |
45 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_toolbar.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_fragment_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
23 |
24 |
25 |
26 |
27 |
28 |
34 |
35 |
36 |
37 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 |
15 |
20 |
21 |
22 |
31 |
32 |
33 |
34 |
35 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_layout_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
26 |
27 |
28 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/nevmenu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/mylook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xhdpi/mylook.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/downlosd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xxhdpi/downlosd.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/look.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xxhdpi/look.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/look.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/app/src/main/res/mipmap-xxxhdpi/look.png
--------------------------------------------------------------------------------
/app/src/main/res/transition/dribbble_shot_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/transition/dribbble_shot_return.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/transition/dribbble_shot_shared_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
23 |
24 |
25 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/transition/dribbble_shot_shared_return.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/transition/home_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 |
21 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/no_connection.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | M26,159 L26,159 L32,159 L32,159 Z
20 | M26,67 L26,159 L32,159 L32,67 Z
21 | M24,206.5 C24,206.5 27.6392462,206.449997 28,206.449997 C28.3607538,206.449997 32,206.5 32,206.5
22 | M23.6061137,207.020699 C23.6061137,207.020699 26.2397148,206 28.494994,206 C30.7502732,206 32.753258,207.020699 32.753258,207.020699
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | M44,8c0-2.2-1.8-4-4-4H8C5.8,4,4,5.8,4,8v24c0,2.2,1.8,4,4,4h28l8,8L44,8z M36,28H12v-4h24V28z M36,22H12v-4h24V22z M36,16H12v-4h24V16z
20 | M38,26H26v12h-4V26H10v-4h12V10h4v12h12V26z
21 | M20,36h8v-4h-8V36z M6,12v4h36v-4H6z M12,26h24v-4H12V26z
22 | M13.3843083,13.3956843 C11.233862,15.5399983 7.7581039,15.5381046 5.61000013,13.3900003 C3.46000004,11.2399998 3.46000004,7.76000023 5.61000013,5.61000013 C7.76000023,3.46000004 11.2400007,3.46000004 13.3900003,5.61000013 C15.54,7.76000023 15.5400009,11.2400007 13.3900003,13.3900003 C13.388104,13.3918967 13.3862067,13.3937913 13.3843083,13.3956843 C15.1427975,15.1834093 19.6826174,19.798706 19.6826172,19.7987061 L13.3843085,13.3956846 L13.3843083,13.3956843 Z
23 | M12 7l-8 9h16l-8-9z
24 | M3 6h18v11H3z
25 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs_badged_image_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs_elastic_drag_dismiss_frame_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs_foreground_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs_lift_off.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs_parallax_scrimage_view.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs_pinnable.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #ff676767
5 | #FF4081
6 | #5acc95
7 |
8 |
9 | #69F0AE
10 | @color/primary
11 | #5acc95
12 | #11261c
13 |
14 | #ffffffff
15 |
16 |
17 | #de000000
18 | #8a000000
19 | #61000000
20 | #ffffffff
21 | #b3ffffff
22 | #4dffffff
23 | #99ffffffprimary
24 | @color/mid_grey
25 | #fafafa
26 | #e0e0e0
27 | #ff333333
28 | #99000000
29 | @color/immersive_bars
30 | #ff676767
31 | #ff292929
32 | #99323232
33 | #40808080
34 | #fff5f5f5
35 | #ffeeeeee
36 | #ffe0e0e0
37 |
38 | #ffe0e0e0
39 | #99000000
40 | #4d000000
41 | #ff2a6046
42 | #ff757575
43 | #ffffffff
44 | #1f000000
45 | #80333333
46 | #ff333333
47 | #ffffffff
48 | #ffdd2c00
49 |
50 |
51 | #43000000
52 | #8f000000
53 |
54 |
55 | #03a9f4 -->
56 | #039be5
57 | #b303a9f4
58 | @android:color/transparent
59 |
60 |
61 | #000133
62 | #ffeceef1
63 | #73000000
64 |
65 |
66 | #fff06292
67 | #ec407a
68 | #ff33292d
69 | #b3f06292
70 | @color/text_primary_light
71 | #deffffff
72 | #ffffffff
73 | #40000000
74 | #b3ffffff
75 |
76 | #f6000000
77 | #732b2828
78 |
79 | #faf1f1f1
80 | #ef6269
81 |
82 |
83 |
--------------------------------------------------------------------------------
/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - @drawable/ic_color_lens_white_24dp
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 120
20 | 368
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LookLook
3 |
4 |
5 | Be kind one another
6 |
7 |
8 | refresh_data
9 | get_image
10 | cache_size
11 | feedback
12 | author
13 | version
14 | pre_nav_color
15 | pre_use_local
16 | pre_status_bar
17 |
18 |
19 | 请检查网络
20 |
21 | shot_background
22 | shot
23 |
24 | nevigation_item
25 |
26 | 知乎日报
27 | 网易头条
28 | 每日看看
29 |
30 | 打开
31 | 关于
32 |
33 |
34 | topnewsimage
35 | topnewlinear
36 |
37 | 每日推送一个漂亮妹子和经典视频,看不看随小主!(长按保存图片)
38 | 我懂
39 |
40 | 小主好眼力,快收了她
41 |
42 | 感谢对项目的支持和关注,项目会不断的升级更新,如果小主感兴趣欢迎一起来贡献,有好的想法也可以随时发email给我.
43 | maat.xing@gmail.com
44 |
45 |
46 | 分享
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/test/java/com/looklook/xinghongfei/looklook/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.looklook.xinghongfei.looklook;
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 | }
--------------------------------------------------------------------------------
/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 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.2'
9 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | maven { url "https://jitpack.io" }
19 | maven { url 'https://jitpack.io' }
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon May 29 20:47:30 CST 2017
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-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/screenshots/LookLook.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/LookLook.gif
--------------------------------------------------------------------------------
/screenshots/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/about.png
--------------------------------------------------------------------------------
/screenshots/meizi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/meizi.png
--------------------------------------------------------------------------------
/screenshots/navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/navigation.png
--------------------------------------------------------------------------------
/screenshots/pay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/pay.png
--------------------------------------------------------------------------------
/screenshots/pay1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/pay1.png
--------------------------------------------------------------------------------
/screenshots/zhihu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinghongfei/LookLook/c436ef9949aa80ee085408900c54e800c839ce77/screenshots/zhihu.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------