├── README.md
└── Wechat-Bottom-navigation
├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── kitrobot
│ │ └── com
│ │ └── wechat_bottom_navigation
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── kitrobot
│ │ │ └── com
│ │ │ └── wechat_bottom_navigation
│ │ │ ├── MainActivity.java
│ │ │ ├── MyAdapter.java
│ │ │ ├── dpAndDx.java
│ │ │ ├── fragment
│ │ │ ├── CategoryFragment.java
│ │ │ ├── FindFragment.java
│ │ │ ├── HomeFragment.java
│ │ │ └── MineFragment.java
│ │ │ └── view
│ │ │ └── MyImageView.java
│ └── res
│ │ ├── drawable
│ │ ├── category_normal.png
│ │ ├── category_selected.png
│ │ ├── find_normal.png
│ │ ├── find_selected.png
│ │ ├── home_normal.png
│ │ ├── home_selected.png
│ │ ├── mine_normal.png
│ │ └── mine_selected.png
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── kitrobot
│ └── com
│ └── wechat_bottom_navigation
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/README.md:
--------------------------------------------------------------------------------
1 | # wechat-Bottom-navigation
2 | 高仿微信底部导航(利用ArgbEvaluator实现字体的变化,自定义imageview实现图片的渐变) 简单易懂, 可直接copy下来放到自己的项目中, 代码量也比较少
3 | ## 详情看博客 http://blog.csdn.net/qq_33408235/article/details/71429783
4 |
5 |
6 | ## 如果你觉得有用, 请star一下, 谢谢
7 |
8 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/misc.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 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.8
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "kitrobot.com.wechat_bottom_navigation"
8 | minSdkVersion 16
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.3.1'
28 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
29 | testCompile 'junit:junit:4.12'
30 | }
31 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/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:\studio\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/androidTest/java/kitrobot/com/wechat_bottom_navigation/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("kitrobot.com.wechat_bottom_navigation", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/MainActivity.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation;
2 |
3 | import android.animation.ArgbEvaluator;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.view.ViewPager;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.view.View;
9 | import android.widget.LinearLayout;
10 | import android.widget.TextView;
11 |
12 | import java.util.ArrayList;
13 |
14 | import kitrobot.com.wechat_bottom_navigation.fragment.CategoryFragment;
15 | import kitrobot.com.wechat_bottom_navigation.fragment.FindFragment;
16 | import kitrobot.com.wechat_bottom_navigation.fragment.HomeFragment;
17 | import kitrobot.com.wechat_bottom_navigation.fragment.MineFragment;
18 | import kitrobot.com.wechat_bottom_navigation.view.MyImageView;
19 |
20 | public class MainActivity extends AppCompatActivity implements View.OnClickListener {
21 |
22 | private ViewPager mViewPager;
23 | private MyImageView mIvHome; // tab 消息的imageview
24 | private TextView mTvHome; // tab 消息的imageview
25 |
26 | private MyImageView mIvCategory; // tab 通讯录的imageview
27 | private TextView mTvCategory;
28 |
29 | private MyImageView mIvFind; // tab 发现的imageview
30 | private TextView mTvFind;
31 |
32 | private MyImageView mIvMine; // tab 我的imageview
33 | private TextView mTvMine;
34 |
35 | private ArrayList mFragments;
36 | private ArgbEvaluator mColorEvaluator;
37 |
38 | private int mTextNormalColor;// 未选中的字体颜色
39 | private int mTextSelectedColor;// 选中的字体颜色
40 | private LinearLayout mLinearLayoutHome;
41 | private LinearLayout mLinearLayoutCategory;
42 | private LinearLayout mLinearLayoutFind;
43 | private LinearLayout mLinearLayoutMine;
44 |
45 | @Override
46 | protected void onCreate(Bundle savedInstanceState) {
47 | super.onCreate(savedInstanceState);
48 | setContentView(R.layout.activity_main);
49 | initColor();//也就是选中未选中的textview的color
50 | initView();// 初始化控件
51 | initData(); // 初始化数据(也就是fragments)
52 | initSelectImage();// 初始化渐变的图片
53 | aboutViewpager(); // 关于viewpager
54 | setListener(); // viewpager设置滑动监听
55 | }
56 |
57 | private void initSelectImage() {
58 | mIvHome.setImages(R.drawable.home_normal, R.drawable.home_selected);
59 | mIvCategory.setImages(R.drawable.category_normal, R.drawable.category_selected);
60 | mIvFind.setImages(R.drawable.find_normal, R.drawable.find_selected);
61 | mIvMine.setImages(R.drawable.mine_normal, R.drawable.mine_selected);
62 | }
63 |
64 | private void initColor() {
65 | mTextNormalColor = getResources().getColor(R.color.main_bottom_tab_textcolor_normal);
66 | mTextSelectedColor = getResources().getColor(R.color.main_bottom_tab_textcolor_selected);
67 | }
68 |
69 |
70 | private void setListener() {
71 | //下面的tab设置点击监听
72 | mLinearLayoutHome.setOnClickListener(this);
73 | mLinearLayoutCategory.setOnClickListener(this);
74 | mLinearLayoutFind.setOnClickListener(this);
75 | mLinearLayoutMine.setOnClickListener(this);
76 |
77 | mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
78 | @Override
79 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPs) {
80 | setTabTextColorAndImageView(position,positionOffset);// 更改text的颜色还有图片
81 | }
82 |
83 | @Override
84 | public void onPageSelected(int position) {
85 | }
86 |
87 | @Override
88 | public void onPageScrollStateChanged(int state) {
89 |
90 | }
91 | });
92 | }
93 |
94 |
95 | private void setTabTextColorAndImageView(int position, float positionOffset) {
96 | mColorEvaluator = new ArgbEvaluator(); // 根据偏移量 来得到
97 | int evaluateCurrent =(int) mColorEvaluator.evaluate(positionOffset,mTextSelectedColor , mTextNormalColor);//当前tab的颜色值
98 | int evaluateThe =(int) mColorEvaluator.evaluate(positionOffset, mTextNormalColor, mTextSelectedColor);// 将要到tab的颜色值
99 | switch (position) {
100 | case 0:
101 | mTvHome.setTextColor(evaluateCurrent); //设置消息的字体颜色
102 | mTvCategory.setTextColor(evaluateThe); //设置通讯录的字体颜色
103 |
104 | mIvHome.transformPage(positionOffset); //设置消息的图片
105 | mIvCategory.transformPage(1-positionOffset); //设置通讯录的图片
106 | break;
107 | case 1:
108 | mTvCategory.setTextColor(evaluateCurrent);
109 | mTvFind.setTextColor(evaluateThe);
110 |
111 | mIvCategory.transformPage(positionOffset);
112 | mIvFind.transformPage(1-positionOffset);
113 | break;
114 | case 2:
115 | mTvFind.setTextColor(evaluateCurrent);
116 | mTvMine.setTextColor(evaluateThe);
117 |
118 | mIvFind.transformPage(positionOffset);
119 | mIvMine.transformPage(1-positionOffset);
120 | break;
121 |
122 | }
123 | }
124 |
125 | private void initData() {
126 | mFragments = new ArrayList<>();
127 | mFragments.add(new HomeFragment());
128 | mFragments.add(new CategoryFragment());
129 | mFragments.add(new FindFragment());
130 | mFragments.add(new MineFragment());
131 | }
132 |
133 | private void aboutViewpager() {
134 | MyAdapter myAdapter = new MyAdapter(getSupportFragmentManager(), mFragments);// 初始化adapter
135 | mViewPager.setAdapter(myAdapter); // 设置adapter
136 | }
137 |
138 | private void initView() {
139 | mLinearLayoutHome = (LinearLayout) findViewById(R.id.ll_home);
140 | mLinearLayoutCategory = (LinearLayout) findViewById(R.id.ll_categroy);
141 | mLinearLayoutFind = (LinearLayout) findViewById(R.id.ll_find);
142 | mLinearLayoutMine = (LinearLayout) findViewById(R.id.ll_mine);
143 | mViewPager = (ViewPager) findViewById(R.id.vp);
144 | mIvHome = (MyImageView) findViewById(R.id.iv1); // tab 微信 imageview
145 | mTvHome = (TextView) findViewById(R.id.rb1); // tab 微信 字
146 |
147 | mIvCategory = (MyImageView) findViewById(R.id.iv2); // tab 通信录 imageview
148 | mTvCategory = (TextView) findViewById(R.id.rb2); // tab 通信录 字
149 |
150 | mIvFind = (MyImageView) findViewById(R.id.iv3); // tab 发现 imageview
151 | mTvFind = (TextView) findViewById(R.id.rb3); // tab 发现 字
152 |
153 | mIvMine = (MyImageView) findViewById(R.id.iv4); // tab 我 imageview
154 | mTvMine = (TextView) findViewById(R.id.rb4); // tab 我 字
155 | }
156 |
157 | @Override
158 | public void onClick(View view) {
159 | switch (view.getId()) {
160 | case R.id.ll_home:
161 | mViewPager.setCurrentItem(0);
162 | break;
163 | case R.id.ll_categroy:
164 | mViewPager.setCurrentItem(1);
165 | break;
166 | case R.id.ll_find:
167 | mViewPager.setCurrentItem(2);
168 | break;
169 | case R.id.ll_mine:
170 | mViewPager.setCurrentItem(3);
171 | break;
172 | }
173 | }
174 |
175 | }
176 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/MyAdapter.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation;
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 java.util.ArrayList;
8 |
9 | /**
10 | * on 2017/5/8.
11 | * 类的描述:
12 | */
13 |
14 | public class MyAdapter extends FragmentPagerAdapter {
15 | ArrayList mFragments;
16 | public MyAdapter(FragmentManager fm , ArrayList fragments) {
17 | super(fm);
18 | mFragments=fragments;
19 | }
20 |
21 | @Override
22 | public Fragment getItem(int position) {
23 | return mFragments.get(position);
24 | }
25 |
26 | @Override
27 | public int getCount() {
28 | return mFragments.size();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/dpAndDx.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * on 2017/5/8.
7 | * 类的描述: dp和dx的工具类
8 | */
9 |
10 | public class dpAndDx {
11 | /**
12 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
13 | */
14 | public static int dip2px(Context context, float dpValue) {
15 | final float scale = context.getResources().getDisplayMetrics().density;
16 | return (int) (dpValue * scale + 0.5f);
17 | }
18 |
19 | /**
20 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp
21 | */
22 | public static int px2dip(Context context, float pxValue) {
23 | final float scale = context.getResources().getDisplayMetrics().density;
24 | return (int) (pxValue / scale + 0.5f);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/fragment/CategoryFragment.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | /**
12 | * on 2017/5/8.
13 | * 类的描述:
14 | */
15 |
16 | public class CategoryFragment extends Fragment {
17 | @Nullable
18 | @Override
19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
20 | TextView textView = new TextView(getActivity());
21 | textView.setText("通讯录");
22 | textView.setTextSize(100);
23 | textView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
24 | textView.setGravity(View.TEXT_ALIGNMENT_CENTER);
25 | return textView;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/fragment/FindFragment.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | /**
12 | * on 2017/5/8.
13 | * 类的描述:
14 | */
15 |
16 | public class FindFragment extends Fragment {
17 | @Nullable
18 | @Override
19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
20 | TextView textView = new TextView(getActivity());
21 | textView.setText("发现");
22 | textView.setTextSize(100);
23 | textView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
24 | textView.setGravity(View.TEXT_ALIGNMENT_CENTER);
25 | return textView;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/fragment/HomeFragment.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | /**
12 | * on 2017/5/8.
13 | * 类的描述:
14 | */
15 |
16 | public class HomeFragment extends Fragment {
17 | @Nullable
18 | @Override
19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
20 | TextView textView = new TextView(getActivity());
21 | textView.setText("微信");
22 | textView.setTextSize(100);
23 | textView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
24 | textView.setGravity(View.TEXT_ALIGNMENT_CENTER);
25 | return textView;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/fragment/MineFragment.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | /**
12 | * on 2017/5/8.
13 | * 类的描述:
14 | */
15 |
16 | public class MineFragment extends Fragment {
17 | @Nullable
18 | @Override
19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
20 | TextView textView = new TextView(getActivity());
21 | textView.setText("我");
22 | textView.setTextSize(100);
23 | textView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
24 | textView.setGravity(View.TEXT_ALIGNMENT_CENTER);
25 | return textView;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/java/kitrobot/com/wechat_bottom_navigation/view/MyImageView.java:
--------------------------------------------------------------------------------
1 |
2 | package kitrobot.com.wechat_bottom_navigation.view;
3 |
4 | import android.content.Context;
5 | import android.graphics.Bitmap;
6 | import android.graphics.BitmapFactory;
7 | import android.graphics.Canvas;
8 | import android.graphics.Paint;
9 | import android.graphics.Rect;
10 | import android.util.AttributeSet;
11 | import android.widget.ImageView;
12 |
13 | import kitrobot.com.wechat_bottom_navigation.R;
14 | import kitrobot.com.wechat_bottom_navigation.dpAndDx;
15 |
16 | /**
17 | * Created by niezhiyang 2017/5/8.
18 | * 自定义imageView 不用再xml中设置src或者backgroud
19 | * 在 setImages的时候 就会传入两张图片
20 | * 在 transformPage的时候 就会根据 offset的大小来设置透明度 从而效果为渐变
21 | */
22 | public class MyImageView extends ImageView {
23 |
24 | private Paint mPaint;
25 | private Bitmap mSelectedIcon;
26 | private Bitmap mNormalIcon;
27 | private Rect mSelectedRect;
28 | private Rect mNormalRect;
29 | private int mSelectedAlpha = 0;
30 |
31 | public MyImageView(Context context) {
32 | super(context);
33 | }
34 |
35 | public MyImageView(Context context, AttributeSet attrs) {
36 | super(context, attrs);
37 | }
38 |
39 | public MyImageView(Context context, AttributeSet attrs, int defStyleAttr) {
40 | super(context, attrs, defStyleAttr);
41 | }
42 |
43 | public final void setImages(int normal, int selected) {
44 | this.mNormalIcon = createBitmap(normal); // 拿到原图
45 | this.mSelectedIcon = createBitmap(selected);
46 | int width = (int)getResources().getDimension(R.dimen.tab_image_weith);
47 | int heigh = (int)getResources().getDimension(R.dimen.tab_image_heigh);
48 | this.mNormalRect = new Rect(0, 0, width, heigh); //拿到画板的大小
49 | this.mSelectedRect = new Rect(0, 0, width, heigh);
50 | this.mPaint = new Paint(); // 拿到画笔
51 | }
52 |
53 | private Bitmap createBitmap(int resId) {
54 | return BitmapFactory.decodeResource(getResources(), resId);
55 | }
56 |
57 | @Override
58 | protected void onDraw(Canvas canvas) {
59 | super.onDraw(canvas);
60 | if (this.mPaint == null) {
61 | return;
62 | }
63 | this.mPaint.setAlpha(255 - this.mSelectedAlpha);
64 | canvas.drawBitmap(this.mNormalIcon, null, this.mNormalRect, this.mPaint); //开始在画板上画原图
65 | // 也就是在这个控件上画bitmap
66 | this.mPaint.setAlpha(this.mSelectedAlpha);
67 | canvas.drawBitmap(this.mSelectedIcon, null, this.mSelectedRect, this.mPaint);
68 | }
69 |
70 | public final void changeSelectedAlpha(int alpha) {
71 |
72 | }
73 |
74 | /**
75 | * 当滑动的时候来调用此方法
76 | * @param offset
77 | */
78 | public final void transformPage(float offset) {
79 | this.mSelectedAlpha = (int) (255 * (1 - offset));
80 | invalidate(); // 此方法调用就会从新走 onDraw方法
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/category_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/category_normal.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/category_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/category_selected.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/find_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/find_normal.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/find_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/find_selected.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/home_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/home_normal.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/home_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/home_selected.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/mine_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/mine_normal.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/drawable/mine_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/drawable/mine_selected.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
17 |
24 |
30 |
35 |
42 |
43 |
44 |
50 |
55 |
62 |
63 |
69 |
74 |
81 |
82 |
88 |
93 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #999999
7 | #46c01b
8 | 33dp
9 | 30dp
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Wechat-Bottom-navigation
3 |
4 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/app/src/test/java/kitrobot/com/wechat_bottom_navigation/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package kitrobot.com.wechat_bottom_navigation;
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 | }
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/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.0'
9 |
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 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/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 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/niezhiyang/wechat-Bottom-navigation/60c8703969fc24bc9e2a04d38f348674988f1257/Wechat-Bottom-navigation/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon May 08 11:26: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 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/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 |
--------------------------------------------------------------------------------
/Wechat-Bottom-navigation/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------