├── .gitignore
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── chaychan
│ │ └── md
│ │ ├── ExampleInstrumentedTest.java
│ │ └── Test.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── chaychan
│ │ │ └── md
│ │ │ ├── MyDividerItemDecoration.java
│ │ │ ├── activity
│ │ │ ├── AppBarLayoutActivity.java
│ │ │ ├── CardViewActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── PaletteActivity1.java
│ │ │ ├── PaletteActivity2.java
│ │ │ ├── RecyclerViewActivity1.java
│ │ │ ├── RecyclerViewActivity2.java
│ │ │ ├── SearchViewActivity.java
│ │ │ ├── TabLayoutActivity.java
│ │ │ └── ToolBarActivity.java
│ │ │ ├── adapter
│ │ │ ├── MyListAdapter.java
│ │ │ ├── MyStaggerAdapter.java
│ │ │ ├── PaletteTabAdapter.java
│ │ │ ├── RvListAdapter.java
│ │ │ └── TabAdapter.java
│ │ │ ├── bean
│ │ │ ├── DataBean.java
│ │ │ └── DemoBean.java
│ │ │ ├── fragment
│ │ │ ├── ContentFragment.java
│ │ │ └── PicFragment.java
│ │ │ └── utils
│ │ │ └── FileUtils.java
│ └── res
│ │ ├── layout
│ │ ├── activity_app_bar_layout.xml
│ │ ├── activity_card_view.xml
│ │ ├── activity_main.xml
│ │ ├── activity_palette.xml
│ │ ├── activity_palette2.xml
│ │ ├── activity_recycler_view.xml
│ │ ├── activity_search_view.xml
│ │ ├── activity_tab_layout.xml
│ │ ├── activity_tool_bar.xml
│ │ ├── item_list.xml
│ │ ├── item_list2.xml
│ │ └── item_stragger.xml
│ │ ├── menu
│ │ ├── menu_recycler_view.xml
│ │ ├── menu_search_view.xml
│ │ └── menu_tool_bar.xml
│ │ ├── mipmap-hdpi
│ │ ├── beauty.jpg
│ │ ├── book.jpg
│ │ ├── colorful.jpg
│ │ ├── flower.jpg
│ │ ├── g1.jpg
│ │ ├── g10.jpg
│ │ ├── g11.jpg
│ │ ├── g12.jpg
│ │ ├── g13.jpg
│ │ ├── g14.jpg
│ │ ├── g15.jpg
│ │ ├── g16.jpg
│ │ ├── g17.jpg
│ │ ├── g18.jpg
│ │ ├── g19.jpg
│ │ ├── g2.jpg
│ │ ├── g20.jpg
│ │ ├── g21.jpg
│ │ ├── g22.jpg
│ │ ├── g23.jpg
│ │ ├── g24.jpg
│ │ ├── g25.jpg
│ │ ├── g26.jpg
│ │ ├── g27.jpg
│ │ ├── g28.jpg
│ │ ├── g29.jpg
│ │ ├── g3.jpg
│ │ ├── g4.jpg
│ │ ├── g5.jpg
│ │ ├── g6.jpg
│ │ ├── g7.jpg
│ │ ├── g8.jpg
│ │ ├── g9.jpg
│ │ ├── h1.jpeg
│ │ ├── h10.jpeg
│ │ ├── h11.jpeg
│ │ ├── h12.jpeg
│ │ ├── h13.jpeg
│ │ ├── h14.jpeg
│ │ ├── h15.jpeg
│ │ ├── h16.jpeg
│ │ ├── h17.jpeg
│ │ ├── h18.jpeg
│ │ ├── h19.jpeg
│ │ ├── h2.jpeg
│ │ ├── h20.jpeg
│ │ ├── h21.jpeg
│ │ ├── h22.jpeg
│ │ ├── h23.jpeg
│ │ ├── h24.jpeg
│ │ ├── h25.jpeg
│ │ ├── h26.jpeg
│ │ ├── h27.jpeg
│ │ ├── h28.jpeg
│ │ ├── h29.jpeg
│ │ ├── h3.jpeg
│ │ ├── h30.jpeg
│ │ ├── h31.jpeg
│ │ ├── h32.jpeg
│ │ ├── h33.jpeg
│ │ ├── h34.jpeg
│ │ ├── h35.jpeg
│ │ ├── h36.jpeg
│ │ ├── h37.jpeg
│ │ ├── h38.jpeg
│ │ ├── h39.jpeg
│ │ ├── h4.jpeg
│ │ ├── h40.jpeg
│ │ ├── h41.jpeg
│ │ ├── h42.jpeg
│ │ ├── h43.jpeg
│ │ ├── h44.jpeg
│ │ ├── h5.jpeg
│ │ ├── h6.jpeg
│ │ ├── h7.jpeg
│ │ ├── h8.jpeg
│ │ ├── h9.jpeg
│ │ ├── head.png
│ │ ├── ic_add.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ ├── ic_menu.png
│ │ ├── ic_search.png
│ │ ├── p1.jpg
│ │ ├── p10.jpg
│ │ ├── p11.jpg
│ │ ├── p12.jpg
│ │ ├── p13.jpg
│ │ ├── p14.jpg
│ │ ├── p15.jpg
│ │ ├── p16.jpg
│ │ ├── p17.jpg
│ │ ├── p18.jpg
│ │ ├── p19.jpg
│ │ ├── p2.jpg
│ │ ├── p20.jpg
│ │ ├── p21.jpg
│ │ ├── p22.jpg
│ │ ├── p23.jpg
│ │ ├── p24.jpg
│ │ ├── p25.jpg
│ │ ├── p26.jpg
│ │ ├── p27.jpg
│ │ ├── p28.jpg
│ │ ├── p29.jpg
│ │ ├── p3.jpg
│ │ ├── p30.jpg
│ │ ├── p31.jpg
│ │ ├── p32.jpg
│ │ ├── p33.jpg
│ │ ├── p34.jpg
│ │ ├── p35.jpg
│ │ ├── p36.jpg
│ │ ├── p37.jpg
│ │ ├── p38.jpg
│ │ ├── p39.jpg
│ │ ├── p4.jpg
│ │ ├── p40.jpg
│ │ ├── p41.jpg
│ │ ├── p42.jpg
│ │ ├── p43.jpg
│ │ ├── p44.jpg
│ │ ├── p5.jpg
│ │ ├── p6.jpg
│ │ ├── p7.jpg
│ │ ├── p8.jpg
│ │ ├── p9.jpg
│ │ └── scenery.jpg
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── back.png
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── array.xml
│ │ ├── array_channel.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── chaychan
│ └── md
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.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 | /.idea
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### 前言
2 | Material Design这种设计语言(风格)的提出已经有数个年头,但是开发的过程中却不是说经常使用到相关的控件,所以有些控件的使用并不是很熟练,所以萌发了复习的念头。我是2015年开始入门android的,那时候找了不少教程,其中包括Android5.0新特性的教学,也是那个时候刚接触Material Design的,该设计风格给我的第一印象是:简洁、用户体验良好、视觉效果震撼,尤其是那些转场动画,真的很炫酷。
3 |
4 | 关于Material Design相关控件的使用,现在决定写成一个系列。再次复习一下,正所谓“温故而知新”,在复习的过程中,也可以收获不少,而且又能帮助到其他人,何乐而不为呢。
5 |
6 | ### 详情可以查看我的Blog
7 |
8 |
9 | #### CSDN
10 |
11 | [MaterialDesign学习篇(一),MaterialDesign的介绍](http://blog.csdn.net/chay_chan/article/details/76038374)
12 |
13 | [MaterialDesign学习篇(二),Toolbar、DrawerLayout的使用](http://blog.csdn.net/chay_chan/article/details/76038408)
14 |
15 | [MaterialDesign学习篇(三),AppBarLayout、CollapsingToolbarLayout的使用](http://blog.csdn.net/Chay_Chan/article/details/76262007)
16 |
17 | [MaterialDesign学习篇(四),如何使用TabLayout](http://blog.csdn.net/Chay_Chan/article/details/76407276)
18 |
19 | [MaterialDesign学习篇(五),使用SearchView的正确姿势](http://blog.csdn.net/chay_chan/article/details/76511028)
20 |
21 | [MaterialDesign学习篇(六),调色板Palette的学习](http://blog.csdn.net/Chay_Chan/article/details/76570461)
22 |
23 | [MaterialDesign学习篇(七),CardView卡片式布局的使用](http://blog.csdn.net/chay_chan/article/details/76583434)
24 |
25 | [MaterialDesign学习篇(八),掌握RecyclerView和SwipeRefreshLayout](http://blog.csdn.net/Chay_Chan/article/details/76649105)
26 |
27 |
28 | #### 简书
29 |
30 | [MaterialDesign学习篇(一),MaterialDesign的介绍](http://www.jianshu.com/p/177d1a2abca7)
31 |
32 | [MaterialDesign学习篇(二),Toolbar、DrawerLayout的使用](http://www.jianshu.com/p/27e62a974ff1)
33 |
34 | [MaterialDesign学习篇(三),AppBarLayout、CollapsingToolbarLayout的使用](http://www.jianshu.com/p/c8d2b94f016f)
35 |
36 | [MaterialDesign学习篇(四),如何使用TabLayout](http://www.jianshu.com/p/61c3f5638a25)
37 |
38 | [MaterialDesign学习篇(五),使用SearchView的正确姿势](http://www.jianshu.com/p/16f9e995e454)
39 |
40 | [MaterialDesign学习篇(六),调色板Palette的学习](http://www.jianshu.com/p/bae9ba0be8f7)
41 |
42 | [MaterialDesign学习篇(七),CardView卡片式布局的使用](http://www.jianshu.com/p/2617bcd98412)
43 |
44 | [MaterialDesign学习篇(八),掌握RecyclerView和SwipeRefreshLayout](http://www.jianshu.com/p/aeba6a2bf59d)
45 |
46 | ### 鼓励和支持
47 |
48 | 如果觉得对你有帮助的话,请star一下并关注我的CSDN和简书,当作鼓励和支持我。如果遇到什么问题,可以在我的博客上评论留言,我会及时为你解答,我非常乐于和他们交流技术,共同进步。
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.3"
6 | defaultConfig {
7 | applicationId "com.chaychan.materialdesignexercise"
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(include: ['*.jar'], dir: 'libs')
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.1'
29 | compile 'com.android.support:design:26.0.0-alpha1'
30 | compile 'com.android.support:palette-v7:26.0.0-alpha1'
31 | compile 'com.android.support:cardview-v7:26.0.0-alpha1'
32 | compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
33 | testCompile 'junit:junit:4.12'
34 | }
35 |
--------------------------------------------------------------------------------
/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 G:\SDK\AndroidStudioSDK/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 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/chaychan/md/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md;
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("com.chaychan.materialdesignexercise", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/chaychan/md/Test.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md;
2 |
3 | import android.test.AndroidTestCase;
4 | import android.util.Log;
5 |
6 | import com.chaychan.md.utils.FileUtils;
7 |
8 | /**
9 | * @author ChayChan
10 | * @date 2017/7/31 21:04
11 | */
12 |
13 | public class Test extends AndroidTestCase {
14 |
15 | public void testQuery(){
16 | String[] musics = FileUtils.queryMusic(getContext(), "黄家驹");
17 | for (String music : musics) {
18 | Log.i("Test",music);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/MyDividerItemDecoration.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Paint;
6 | import android.graphics.Rect;
7 | import android.support.v7.widget.RecyclerView;
8 | import android.view.View;
9 |
10 | /**
11 | * @author ChayChan
12 | * @date 2017/8/3 17:18
13 | */
14 |
15 | public class MyDividerItemDecoration extends RecyclerView.ItemDecoration{
16 |
17 | private Paint mPaint;
18 | private int mDividerHeight;
19 |
20 | public MyDividerItemDecoration(Context context, int dividerHeight, int dividerColor){
21 | mDividerHeight = dividerHeight;
22 | mPaint = new Paint();
23 | mPaint.setColor(dividerColor);
24 | }
25 |
26 | @Override
27 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
28 | super.getItemOffsets(outRect, view, parent, state);
29 | outRect.bottom = mDividerHeight;//矩形的底部赋值分割线的高度
30 | }
31 |
32 | @Override
33 | public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
34 | int childCount = parent.getChildCount();//获取到子View的个数
35 | int left = parent.getPaddingLeft();
36 | int right = parent.getWidth() - parent.getPaddingRight();
37 |
38 | for (int i = 0; i < childCount - 1; i++) {
39 | View view = parent.getChildAt(i);
40 | float top = view.getBottom();
41 | float bottom = view.getBottom() + mDividerHeight;//子View底部添加分割线的高度
42 | c.drawRect(left, top, right, bottom, mPaint);//绘制
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/AppBarLayoutActivity.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.view.Window;
6 |
7 | import com.chaychan.md.R;
8 |
9 |
10 | public class AppBarLayoutActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
16 | setContentView(R.layout.activity_app_bar_layout);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/CardViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 |
6 | import com.chaychan.md.R;
7 |
8 |
9 | public class CardViewActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_card_view);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.app.ListActivity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.ArrayAdapter;
8 | import android.widget.ListView;
9 |
10 | import com.chaychan.md.bean.DemoBean;
11 |
12 | public class MainActivity extends ListActivity {
13 |
14 | private DemoBean[] mDatas= {
15 | new DemoBean("ToolBarDemo",ToolBarActivity.class),
16 | new DemoBean("AppBarLayoutDemo",AppBarLayoutActivity.class),
17 | new DemoBean("TabLayoutDemo",TabLayoutActivity.class),
18 | new DemoBean("SearchViewDemo",SearchViewActivity.class),
19 | new DemoBean("PaletteDemo1",PaletteActivity1.class),
20 | new DemoBean("PaletteDemo2",PaletteActivity2.class),
21 | new DemoBean("CardViewDemo",CardViewActivity.class),
22 | new DemoBean("RecyclerViewDemo1",RecyclerViewActivity1.class),
23 | new DemoBean("RecyclerViewDemo2",RecyclerViewActivity2.class)
24 | };
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 |
30 | ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, mDatas);
31 | setListAdapter(adapter);
32 | }
33 |
34 | @Override
35 | protected void onListItemClick(ListView l, View v, int position, long id) {
36 | //为条目设置点击事件
37 | DemoBean dataBean = mDatas[position];
38 | startActivity(new Intent(this,dataBean.clazz));//跳转到对应的activity
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/PaletteActivity1.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.Color;
5 | import android.graphics.drawable.BitmapDrawable;
6 | import android.os.Bundle;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.support.v7.graphics.Palette;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import com.chaychan.md.R;
13 |
14 |
15 | public class PaletteActivity1 extends AppCompatActivity {
16 |
17 | private TextView mTvVibrant;
18 | private TextView mTvLightVibrant;
19 | private TextView mTvDarkVibrant;
20 | private TextView mTvMuted;
21 | private TextView mTvLightMuted;
22 | private TextView mTvDarkMuted;
23 | private ImageView mIvPic;
24 | private TextView mTvTitle;
25 | private TextView mTvBody;
26 |
27 | @Override
28 | protected void onCreate(Bundle savedInstanceState) {
29 | super.onCreate(savedInstanceState);
30 | setContentView(R.layout.activity_palette);
31 |
32 | initView();
33 | pickPicColors();
34 | }
35 |
36 | private void initView() {
37 | mIvPic = (ImageView) findViewById(R.id.iv_pic);
38 | mTvTitle = (TextView) findViewById(R.id.tv_title);
39 | mTvBody = (TextView) findViewById(R.id.tv_body);
40 |
41 | mTvVibrant = (TextView) findViewById(R.id.tv_vibrant);
42 | mTvLightVibrant = (TextView) findViewById(R.id.tv_light_vibrant);
43 | mTvDarkVibrant = (TextView) findViewById(R.id.tv_dark_vibrant);
44 |
45 | mTvMuted = (TextView) findViewById(R.id.tv_muted);
46 | mTvLightMuted = (TextView) findViewById(R.id.tv_light_muted);
47 | mTvDarkMuted = (TextView) findViewById(R.id.tv_dark_muted);
48 | }
49 |
50 | public void pickPicColors() {
51 | Bitmap bitmap = ((BitmapDrawable) mIvPic.getDrawable()).getBitmap();
52 | Palette.Builder builder = Palette.from(bitmap);
53 | builder.generate(new Palette.PaletteAsyncListener() {
54 | @Override
55 | public void onGenerated(Palette palette) {
56 | //提取有活力的颜色
57 | int vibrantColor = palette.getVibrantColor(Color.RED);
58 | mTvVibrant.setBackgroundColor(vibrantColor);
59 |
60 | //提取有活力的 亮色
61 | int lightVibrantColor = palette.getLightVibrantColor(Color.RED);
62 | mTvLightVibrant.setBackgroundColor(lightVibrantColor);
63 |
64 | //提取有活力的 暗色
65 | int darkVibrantColor = palette.getDarkVibrantColor(Color.RED);
66 | mTvDarkVibrant.setBackgroundColor(darkVibrantColor);
67 |
68 | //提取柔和的颜色
69 | int mutedColor = palette.getMutedColor(Color.RED);
70 | mTvMuted.setBackgroundColor(mutedColor);
71 |
72 | //提取柔和的亮色
73 | int lightMutedColor = palette.getLightMutedColor(Color.RED);
74 | mTvLightMuted.setBackgroundColor(lightMutedColor);
75 |
76 | //提取柔和的暗色
77 | int darkMutedColor = palette.getDarkMutedColor(Color.RED);
78 | mTvDarkMuted.setBackgroundColor(darkMutedColor);
79 |
80 |
81 | Palette.Swatch vibrantSwatch = palette.getVibrantSwatch();//获取有活力的颜色样本
82 | Palette.Swatch lightVibrantSwatch = palette.getLightVibrantSwatch();//获取有活力 亮色的样本
83 | Palette.Swatch drakVibrantSwatch = palette.getDarkVibrantSwatch();//获取有活力 暗色的样本
84 |
85 | Palette.Swatch mutedSwatch = palette.getMutedSwatch();//获取柔和的颜色样本
86 | Palette.Swatch lightMutedSwatch = palette.getLightMutedSwatch();//获取柔和 亮色的样本
87 | Palette.Swatch darkMutedSwatch = palette.getDarkMutedSwatch();//获取柔和 暗色的样本
88 |
89 | // int rgb = vibrantSwatch.getRgb();//获取对应样本的rgb
90 | // float[] hsl = vibrantSwatch.getHsl();//获取hsl颜色
91 | // int population = vibrantSwatch.getPopulation();//获取像素的数量
92 | // int titleTextColor = vibrantSwatch.getTitleTextColor();//获取适合标题文字的颜色
93 | // int bodyTextColor = vibrantSwatch.getBodyTextColor();//获取适配内容文字的颜色
94 |
95 |
96 | //获取适合标题文字的颜色
97 | int titleTextColor = drakVibrantSwatch.getTitleTextColor();
98 | mTvTitle.setTextColor(titleTextColor);
99 | ;
100 | //获取适合内容文字的颜色
101 | int bodyTextColor = drakVibrantSwatch.getBodyTextColor();
102 | mTvBody.setTextColor(bodyTextColor);
103 |
104 | }
105 | });
106 | }
107 |
108 | private int generateTransparentColor(float percent, int rgb) {
109 | int red = Color.red(rgb);
110 | int green = Color.green(rgb);
111 | int blue = Color.blue(rgb);
112 | int alpha = Color.alpha(rgb);
113 | alpha = (int) (alpha * percent);
114 | return Color.argb(alpha, red, green, blue);
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/PaletteActivity2.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BitmapFactory;
5 | import android.graphics.Color;
6 | import android.os.Bundle;
7 | import android.support.design.widget.TabLayout;
8 | import android.support.v4.view.ViewPager;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.support.v7.graphics.Palette;
11 | import android.support.v7.widget.Toolbar;
12 | import android.view.View;
13 | import android.view.Window;
14 |
15 | import com.chaychan.md.R;
16 | import com.chaychan.md.adapter.PaletteTabAdapter;
17 | import com.chaychan.md.fragment.PicFragment;
18 |
19 | import java.util.ArrayList;
20 | import java.util.HashMap;
21 | import java.util.List;
22 |
23 | import static com.chaychan.md.R.id.toolbar;
24 |
25 |
26 | public class PaletteActivity2 extends AppCompatActivity {
27 |
28 | private Toolbar mToolbar;
29 | private TabLayout mTabLayout;
30 | private String[] mTitles = new String[]{
31 | "风景",
32 | "美女",
33 | "花儿"
34 | };
35 | private List mFragments = new ArrayList<>();
36 | private int[] mImgResources = new int[]{
37 | R.mipmap.scenery,
38 | R.mipmap.beauty,
39 | R.mipmap.flower
40 | };
41 | private ViewPager mVpContent;
42 | private HashMap mSwatchMap = new HashMap<>();
43 |
44 | @Override
45 | protected void onCreate(Bundle savedInstanceState) {
46 | super.onCreate(savedInstanceState);
47 | supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
48 | setContentView(R.layout.activity_palette2);
49 |
50 | initView();
51 | initToolbar();
52 | initFragments();
53 | initListener();
54 | }
55 |
56 |
57 | private void initView() {
58 | mToolbar = (Toolbar) findViewById(toolbar);
59 | mTabLayout = (TabLayout) findViewById(R.id.tab);
60 | mVpContent = (ViewPager) findViewById(R.id.vp_content);
61 | }
62 |
63 | private void initToolbar() {
64 | setSupportActionBar(mToolbar);
65 | mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
66 | @Override
67 | public void onClick(View v) {
68 | finish();
69 | }
70 | });
71 | }
72 |
73 | private void initFragments() {
74 | for (int i = 0; i < mTitles.length; i++) {
75 | PicFragment fragment = new PicFragment();
76 | Bundle bundle = new Bundle();
77 | bundle.putInt(PicFragment.IMG_RESOURCE,mImgResources[i]);
78 | fragment.setArguments(bundle);
79 | mFragments.add(fragment);//添加到集合中
80 | }
81 | }
82 |
83 | private void initListener() {
84 | changeColor(0);
85 | PaletteTabAdapter tabAdapter = new PaletteTabAdapter(getSupportFragmentManager(), mFragments, mTitles);
86 | mVpContent.setAdapter(tabAdapter);
87 | mVpContent.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
88 | @Override
89 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
90 |
91 | }
92 |
93 | @Override
94 | public void onPageSelected(int position) {
95 | changeColor(position);
96 | }
97 |
98 | @Override
99 | public void onPageScrollStateChanged(int state) {
100 |
101 | }
102 | });
103 | mTabLayout.setupWithViewPager(mVpContent);
104 | }
105 |
106 | /**
107 | * 改变各部分的颜色
108 | * @param position 下标
109 | */
110 | private void changeColor(final int position) {
111 | Palette.Swatch swatch = mSwatchMap.get(position);
112 | if (swatch != null){
113 | setColor(swatch);//设置颜色
114 | return;
115 | }
116 | // 用来提取颜色的Bitmap
117 | Bitmap bitmap = BitmapFactory.decodeResource(getResources(),mImgResources[position]);
118 | // Palette的部分
119 | Palette.Builder builder = Palette.from(bitmap);
120 | builder.generate(new Palette.PaletteAsyncListener() {
121 | @Override
122 | public void onGenerated(Palette palette) {
123 | //获取到充满活力的样本
124 | Palette.Swatch vibrant = palette.getVibrantSwatch();
125 | setColor(vibrant);//设置颜色
126 | mSwatchMap.put(position,vibrant);//保存对应位置的样本对象
127 | }
128 | });
129 | }
130 |
131 | /**
132 | * 设置颜色
133 | * @param vibrant
134 | */
135 | private void setColor(Palette.Swatch vibrant) {
136 | // 将颜色设置给状态栏
137 | if (android.os.Build.VERSION.SDK_INT >= 21) {
138 | Window window = getWindow();
139 | window.setStatusBarColor(deepenColor(vibrant.getRgb()));//设置状态栏的颜色,设置颜色之前对颜色进行加深处理
140 | window.setNavigationBarColor(deepenColor(vibrant.getRgb()));//设置导航栏的颜色,设置颜色之前对颜色进行加深处理
141 | }
142 |
143 | mToolbar.setBackgroundColor(vibrant.getRgb());//设置Toolbar背景色
144 | mTabLayout.setBackgroundColor(vibrant.getRgb());//设置TabLayout背景色
145 | mTabLayout.setSelectedTabIndicatorColor(deepenColor(vibrant.getRgb()));//设置TabLayout指示器的颜色
146 | }
147 |
148 | /**
149 | * 颜色加深处理
150 | *
151 | * @param RGBValues RGB的值,由alpha(透明度)、red(红)、green(绿)、blue(蓝)构成,
152 | * Android中我们一般使用它的16进制,
153 | * 例如:"#FFAABBCC",最左边到最右每两个字母就是代表alpha(透明度)、
154 | * red(红)、green(绿)、blue(蓝)。每种颜色值占一个字节(8位),值域0~255
155 | * 所以下面使用移位的方法可以得到每种颜色的值,然后每种颜色值减小一下,在合成RGB颜色,颜色就会看起来深一些了
156 | * @return
157 | */
158 | private int deepenColor(int RGBValues) {
159 | int alpha = RGBValues >> 24;
160 | int red = RGBValues >> 16 & 0xFF;
161 | int green = RGBValues >> 8 & 0xFF;
162 | int blue = RGBValues & 0xFF;
163 | red = (int) Math.floor(red * (1 - 0.1));
164 | green = (int) Math.floor(green * (1 - 0.1));
165 | blue = (int) Math.floor(blue * (1 - 0.1));
166 | return Color.rgb(red, green, blue);
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/RecyclerViewActivity1.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.os.Handler;
6 | import android.support.v4.widget.SwipeRefreshLayout;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.support.v7.widget.GridLayoutManager;
9 | import android.support.v7.widget.LinearLayoutManager;
10 | import android.support.v7.widget.RecyclerView;
11 | import android.support.v7.widget.StaggeredGridLayoutManager;
12 | import android.view.Menu;
13 | import android.view.MenuItem;
14 | import android.view.View;
15 | import android.widget.GridLayout;
16 | import android.widget.LinearLayout;
17 | import android.widget.Toast;
18 |
19 | import com.chaychan.md.R;
20 | import com.chaychan.md.adapter.MyListAdapter;
21 | import com.chaychan.md.adapter.MyStaggerAdapter;
22 | import com.chaychan.md.bean.DataBean;
23 |
24 | import java.util.ArrayList;
25 | import java.util.List;
26 |
27 |
28 | public class RecyclerViewActivity1 extends AppCompatActivity {
29 |
30 | private RecyclerView mRv;
31 |
32 | private List mDatas = new ArrayList();
33 | private List mStaggerDatas = new ArrayList();
34 |
35 | private int[] mListIcons = new int[]{R.mipmap.g1, R.mipmap.g2, R.mipmap.g3, R.mipmap.g4,
36 | R.mipmap.g5, R.mipmap.g6, R.mipmap.g7, R.mipmap.g8, R.mipmap.g9, R.mipmap.g10, R
37 | .mipmap.g11, R.mipmap.g12, R.mipmap.g13, R.mipmap.g14, R.mipmap.g15, R.mipmap
38 | .g16, R.mipmap.g17, R.mipmap.g18, R.mipmap.g19, R.mipmap.g20, R.mipmap.g21, R
39 | .mipmap.g22, R.mipmap.g23, R.mipmap.g24, R.mipmap.g25, R.mipmap.g26, R.mipmap
40 | .g27, R.mipmap.g28, R.mipmap.g29};
41 |
42 | private int[] mStaggeredIcons = new int[]{R.mipmap.p1, R.mipmap.p2, R.mipmap.p3, R
43 | .mipmap.p4, R.mipmap.p5, R.mipmap.p6, R.mipmap.p7, R.mipmap.p8, R.mipmap.p9, R
44 | .mipmap.p10, R.mipmap.p11, R.mipmap.p12, R.mipmap.p13, R.mipmap.p14, R.mipmap
45 | .p15, R.mipmap.p16, R.mipmap.p17, R.mipmap.p18, R.mipmap.p19, R.mipmap.p20, R
46 | .mipmap.p21, R.mipmap.p22, R.mipmap.p23, R.mipmap.p24, R.mipmap.p25, R.mipmap
47 | .p26, R.mipmap.p27, R.mipmap.p28, R.mipmap.p29, R.mipmap.p30, R.mipmap.p31, R
48 | .mipmap.p32, R.mipmap.p33, R.mipmap.p34, R.mipmap.p35, R.mipmap.p36, R.mipmap
49 | .p37, R.mipmap.p38, R.mipmap.p39, R.mipmap.p40, R.mipmap.p41, R.mipmap.p42, R
50 | .mipmap.p43, R.mipmap.p44};
51 | private MyListAdapter mListAdapter;
52 | private MyStaggerAdapter mStaggerAdapter;
53 | private SwipeRefreshLayout mSrlRoot;
54 | private Handler mHandler = new Handler();
55 |
56 | @Override
57 | protected void onCreate(Bundle savedInstanceState) {
58 | super.onCreate(savedInstanceState);
59 | setContentView(R.layout.activity_recycler_view);
60 |
61 | initView();
62 | initData();
63 | initListAdapterV();//默认是垂直的线性布局
64 | initListener();
65 | }
66 |
67 |
68 | private void initView() {
69 | mSrlRoot = (SwipeRefreshLayout) findViewById(R.id.srl);
70 | mRv = (RecyclerView) findViewById(R.id.rv);
71 | }
72 |
73 | private void initData(){
74 | for (int i = 0; i < mListIcons.length; i++) {
75 | int iconId = mListIcons[i];
76 | DataBean dataBean = new DataBean();
77 | dataBean.iconId = iconId;
78 | dataBean.content = "我是条目" + i;
79 | mDatas.add(dataBean);
80 | }
81 |
82 | for (int i = 0; i < mStaggeredIcons.length; i++) {
83 | int iconId = mStaggeredIcons[i];
84 | DataBean dataBean = new DataBean();
85 | dataBean.iconId = iconId;
86 | dataBean.content = "我是条目" + i;
87 | mStaggerDatas.add(dataBean);
88 | }
89 |
90 | mListAdapter = new MyListAdapter(this, mDatas);
91 | mStaggerAdapter = new MyStaggerAdapter(this, mStaggerDatas);
92 | }
93 |
94 | private void initListener() {
95 | mSrlRoot.setColorSchemeColors(Color.RED,Color.GREEN,Color.BLUE);
96 | mSrlRoot.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
97 | @Override
98 | public void onRefresh() {
99 | mHandler.postDelayed(new Runnable() {
100 | @Override
101 | public void run() {
102 | mSrlRoot.setRefreshing(false);//收起下拉刷新
103 | Toast.makeText(RecyclerViewActivity1.this, "刷新完毕", Toast.LENGTH_SHORT).show();
104 | }
105 | },3000);
106 | }
107 | });
108 |
109 | mListAdapter.setOnItemClickListener(new MyListAdapter.MyItemClickListener() {
110 | @Override
111 | public void onItemClick(View view, int postion) {
112 | Toast.makeText(RecyclerViewActivity1.this, mDatas.get(postion).content, Toast.LENGTH_SHORT).show();
113 | }
114 | });
115 | }
116 |
117 | //纵向列表布局
118 | private void initListAdapterV() {
119 | LinearLayoutManager layoutManger = new LinearLayoutManager(this, LinearLayout.VERTICAL, false);
120 | mRv.setLayoutManager(layoutManger);
121 | mRv.setAdapter(mListAdapter);
122 | }
123 |
124 | //横向列表布局
125 | private void initListAdapterH(){
126 | LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayout.HORIZONTAL, false);
127 | mRv.setLayoutManager(layoutManager);
128 | mRv.setAdapter(mListAdapter);
129 | }
130 |
131 | //纵向的网格布局
132 | private void initGridAdapterV() {
133 | GridLayoutManager layoutManager = new GridLayoutManager(this,2, GridLayout.VERTICAL, false);
134 | mRv.setLayoutManager(layoutManager);
135 | mRv.setAdapter(mListAdapter);
136 | }
137 |
138 | //横向的网格布局
139 | private void initGridAdapterH() {
140 | GridLayoutManager layoutManager = new GridLayoutManager(this,2,GridLayout.HORIZONTAL, false);
141 | mRv.setLayoutManager(layoutManager);
142 | mRv.setAdapter(mListAdapter);
143 | }
144 |
145 | //纵向的瀑布流布局
146 | private void initStaggerAdapterV(){
147 | StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
148 | mRv.setLayoutManager(layoutManager);
149 | mRv.setAdapter(mStaggerAdapter);
150 | }
151 |
152 | //横向的瀑布流布局
153 | private void initStaggerAdapterH(){
154 | StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.HORIZONTAL);
155 | mRv.setLayoutManager(layoutManager);
156 | mRv.setAdapter(mStaggerAdapter);
157 | }
158 |
159 | @Override
160 | public boolean onCreateOptionsMenu(Menu menu) {
161 | // Inflate the menu; this adds items to the action bar if it is present.
162 | getMenuInflater().inflate(R.menu.menu_recycler_view, menu);
163 | return true;
164 | }
165 |
166 | @Override
167 | public boolean onOptionsItemSelected(MenuItem item) {
168 | switch (item.getItemId()) {
169 | case R.id.action_list_v://纵向列表布局
170 | initListAdapterV();
171 | break;
172 | case R.id.action_list_h://横向列表布局
173 | initListAdapterH();
174 | break;
175 | case R.id.action_grid_v://纵向网格布局
176 | initGridAdapterV();
177 | break;
178 | case R.id.action_grid_h://横向网格布局
179 | initGridAdapterH();
180 | break;
181 | case R.id.action_stagger_v://纵向瀑布流布局
182 | initStaggerAdapterV();
183 | break;
184 | case R.id.action_stagger_h://横向瀑布流布局
185 | initStaggerAdapterH();
186 | break;
187 | }
188 |
189 | return super.onOptionsItemSelected(item);
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/RecyclerViewActivity2.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.os.Bundle;
4 | import android.os.Handler;
5 | import android.support.v4.widget.SwipeRefreshLayout;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.support.v7.widget.LinearLayoutManager;
8 | import android.support.v7.widget.RecyclerView;
9 | import android.widget.Toast;
10 |
11 | import com.chaychan.md.MyDividerItemDecoration;
12 | import com.chaychan.md.R;
13 | import com.chaychan.md.adapter.RvListAdapter;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 |
19 | public class RecyclerViewActivity2 extends AppCompatActivity {
20 |
21 | private RecyclerView mRv;
22 | private List mDatas = new ArrayList<>();
23 | private Handler mHandler = new Handler();
24 | private SwipeRefreshLayout mSrlRoot;
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.activity_recycler_view);
30 |
31 |
32 | initView();
33 | initData();
34 | initListener();
35 | }
36 |
37 | private void initView() {
38 | mSrlRoot = (SwipeRefreshLayout) findViewById(R.id.srl);
39 | mRv = (RecyclerView) findViewById(R.id.rv);
40 | }
41 |
42 | private void initData() {
43 | for (int i = 0; i < 20; i++) {
44 | mDatas.add("我是条目" + i);
45 | }
46 | }
47 |
48 | private void initListener() {
49 | mRv.addItemDecoration(new MyDividerItemDecoration(this,1,getResources().getColor(R.color.divider)));
50 | mRv.setLayoutManager(new LinearLayoutManager(this));
51 | mRv.setAdapter(new RvListAdapter(this,mDatas));
52 |
53 | mSrlRoot.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
54 | @Override
55 | public void onRefresh() {
56 | mHandler.postDelayed(new Runnable() {
57 | @Override
58 | public void run() {
59 | mSrlRoot.setRefreshing(false);
60 | Toast.makeText(RecyclerViewActivity2.this, "刷新完毕", Toast.LENGTH_SHORT).show();
61 | }
62 | },2000);
63 | }
64 | });
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/SearchViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.Manifest;
4 | import android.content.pm.PackageManager;
5 | import android.os.Bundle;
6 | import android.support.annotation.NonNull;
7 | import android.support.v4.app.ActivityCompat;
8 | import android.support.v4.content.ContextCompat;
9 | import android.support.v4.view.MenuItemCompat;
10 | import android.support.v7.app.AppCompatActivity;
11 | import android.support.v7.widget.SearchView;
12 | import android.support.v7.widget.Toolbar;
13 | import android.text.TextUtils;
14 | import android.view.Menu;
15 | import android.view.MenuItem;
16 | import android.view.View;
17 | import android.view.Window;
18 | import android.widget.ArrayAdapter;
19 | import android.widget.ListView;
20 | import android.widget.Toast;
21 |
22 | import com.chaychan.md.R;
23 | import com.chaychan.md.utils.FileUtils;
24 |
25 | import java.lang.reflect.Method;
26 |
27 | import static com.chaychan.md.R.id.toolbar;
28 |
29 |
30 | public class SearchViewActivity extends AppCompatActivity{
31 |
32 | private static final String TAG = SearchViewActivity.class.getSimpleName();
33 | private static final int REQ_PERMISSION = 100;
34 | private SearchView.SearchAutoComplete mSearchAutoComplete;
35 | private SearchView mSearchView;
36 | private Toolbar mToolbar;
37 | private ListView mLvMusic;
38 |
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | super.onCreate(savedInstanceState);
42 | supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
43 | setContentView(R.layout.activity_search_view);
44 |
45 | initView();
46 | initToolbar();
47 | requestPermission();
48 | }
49 |
50 |
51 | private void initView() {
52 | mToolbar = (Toolbar) findViewById(toolbar);
53 | mLvMusic = (ListView) findViewById(R.id.lv_music);
54 | }
55 |
56 | private void initToolbar() {
57 | setSupportActionBar(mToolbar);
58 | mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
59 | @Override
60 | public void onClick(View v) {
61 | if (mSearchAutoComplete.isShown()) {
62 | try {
63 | mSearchAutoComplete.setText("");//清除文本
64 | //利用反射调用收起SearchView的onCloseClicked()方法
65 | Method method = mSearchView.getClass().getDeclaredMethod("onCloseClicked");
66 | method.setAccessible(true);
67 | method.invoke(mSearchView);
68 | } catch (Exception e) {
69 | e.printStackTrace();
70 | }
71 | } else {
72 | finish();
73 | }
74 | }
75 | });
76 | }
77 |
78 | private void requestPermission() {
79 | if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){
80 | //如果还没有读取SD卡的权限,申请
81 | ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},REQ_PERMISSION);
82 | }
83 | }
84 |
85 | @Override
86 | public boolean onCreateOptionsMenu(Menu menu) {
87 | getMenuInflater().inflate(R.menu.menu_search_view, menu);
88 |
89 | MenuItem searchItem = menu.findItem(R.id.action_search);
90 | mSearchView = (SearchView) MenuItemCompat.getActionView(searchItem);
91 | mSearchView.setQueryHint("输入歌曲名查找");
92 |
93 | mSearchView.onActionViewExpanded();// 当展开无输入内容的时候,没有关闭的图标
94 | mSearchView.setIconified(true);//设置searchView处于展开状态
95 |
96 | // searchView.setSubmitButtonEnabled(true);
97 | mSearchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
98 | @Override
99 | public boolean onQueryTextSubmit(String query) {
100 | //提交按钮的点击事件
101 | Toast.makeText(SearchViewActivity.this, query, Toast.LENGTH_SHORT).show();
102 | return true;
103 | }
104 |
105 | @Override
106 | public boolean onQueryTextChange(String newText) {
107 | //当输入框内容改变的时候回调
108 | // Log.i(TAG,"内容: " + newText);
109 | quertMusic(newText);
110 | return true;
111 | }
112 | });
113 |
114 |
115 | mSearchAutoComplete = (SearchView.SearchAutoComplete) mSearchView.findViewById(R.id.search_src_text);
116 |
117 | //设置输入框内容文字和提示文字的颜色
118 | mSearchAutoComplete.setHintTextColor(getResources().getColor(android.R.color.white));
119 | mSearchAutoComplete.setTextColor(getResources().getColor(android.R.color.white));
120 |
121 | return super.onCreateOptionsMenu(menu);
122 | }
123 |
124 | /**
125 | * 模糊查找音乐
126 | * @param key
127 | */
128 | private void quertMusic(String key) {
129 | String[] musics = new String[]{};
130 | if (!TextUtils.isEmpty(key)){
131 | musics = FileUtils.queryMusic(this, key);
132 | }
133 | ArrayAdapter adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, musics);
134 | mLvMusic.setAdapter(adapter);
135 | }
136 |
137 | @Override
138 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
139 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
140 |
141 | if (requestCode == REQ_PERMISSION) {
142 | if (grantResults[0] != PackageManager.PERMISSION_GRANTED){
143 | Toast.makeText(this, "读取SD卡权限被拒绝了", Toast.LENGTH_SHORT).show();
144 | }
145 | }
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/TabLayoutActivity.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.TabLayout;
5 | import android.support.v4.view.ViewPager;
6 | import android.support.v7.app.AppCompatActivity;
7 |
8 | import com.chaychan.md.R;
9 | import com.chaychan.md.adapter.TabAdapter;
10 | import com.chaychan.md.fragment.ContentFragment;
11 |
12 | import java.util.ArrayList;
13 | import java.util.List;
14 |
15 |
16 | public class TabLayoutActivity extends AppCompatActivity {
17 |
18 | private TabLayout mTabLayout;
19 | private ViewPager mVpContent;
20 |
21 | private List mFragments = new ArrayList<>();
22 | private String[] mTitles;
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_tab_layout);
28 |
29 | initView();
30 | initData();
31 | initListener();
32 | }
33 |
34 | private void initView() {
35 | mTabLayout = (TabLayout) findViewById(R.id.tab);
36 | mVpContent = (ViewPager) findViewById(R.id.vp_content);
37 | }
38 |
39 | private void initData() {
40 | mTitles = getResources().getStringArray(R.array.channel);
41 | for (int i = 0; i < mTitles.length; i++) {
42 | ContentFragment fragment = new ContentFragment();
43 | Bundle bundle = new Bundle();
44 | bundle.putString(ContentFragment.TEXT, mTitles[i]);
45 | fragment.setArguments(bundle);
46 | mFragments.add(fragment);//添加到fragment中
47 | }
48 | }
49 |
50 | private void initListener() {
51 | TabAdapter tabAdapter = new TabAdapter(getSupportFragmentManager(), mFragments, mTitles);
52 | mVpContent.setAdapter(tabAdapter);//为viewPager设置adapter
53 | mTabLayout.setupWithViewPager(mVpContent);//将TabLayout和ViewPager关联
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/activity/ToolBarActivity.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentTransaction;
6 | import android.support.v4.widget.DrawerLayout;
7 | import android.support.v7.app.ActionBarDrawerToggle;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.support.v7.widget.Toolbar;
10 | import android.view.MenuItem;
11 | import android.view.View;
12 | import android.view.Window;
13 | import android.widget.AdapterView;
14 | import android.widget.ArrayAdapter;
15 | import android.widget.ListView;
16 | import android.widget.Toast;
17 |
18 | import com.chaychan.md.R;
19 | import com.chaychan.md.fragment.ContentFragment;
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 |
24 | public class ToolBarActivity extends AppCompatActivity{
25 |
26 | private Toolbar mToolbar;
27 | private DrawerLayout mDrawerLayout;
28 | private ActionBarDrawerToggle mDrawerToggle;
29 | private List mFragments = new ArrayList<>();
30 | private ListView mLvList;
31 |
32 | private String[] mMenuTitles;
33 |
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
38 | setContentView(R.layout.activity_tool_bar);
39 |
40 |
41 | initView();
42 | initToolBar();
43 | initMenuTitles();
44 | initFragments();
45 | initDrawerLayout();
46 | }
47 |
48 |
49 | private void initView() {
50 | mToolbar = (Toolbar) findViewById(R.id.toolbar);
51 | mDrawerLayout = (DrawerLayout) findViewById(R.id.drawlayout);
52 | mLvList = (ListView) findViewById(R.id.lv_list);
53 | }
54 |
55 | private void initToolBar() {
56 | mToolbar.setBackgroundColor(getResources().getColor(R.color.toolbar_bg));//设置Toolbar的背景颜色
57 |
58 | mToolbar.setNavigationIcon(R.mipmap.ic_menu);//设置导航的图标
59 | mToolbar.setLogo(R.mipmap.ic_launcher);//设置logo
60 |
61 | mToolbar.setTitle("title");//设置标题
62 | mToolbar.setSubtitle("subtitle");//设置子标题
63 |
64 | mToolbar.setTitleTextColor(getResources().getColor(android.R.color.white));//设置标题的字体颜色
65 | mToolbar.setSubtitleTextColor(getResources().getColor(android.R.color.white));//设置子标题的字体颜色
66 |
67 | //设置右上角的填充菜单
68 | mToolbar.inflateMenu(R.menu.menu_tool_bar);
69 | //设置导航图标的点击事件
70 | mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
71 | @Override
72 | public void onClick(View v) {
73 | Toast.makeText(ToolBarActivity.this, "菜单", Toast.LENGTH_SHORT).show();
74 | }
75 | });
76 | //设置右侧菜单项的点击事件
77 | mToolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
78 | @Override
79 | public boolean onMenuItemClick(MenuItem item) {
80 | int id = item.getItemId();
81 | String tip = "";
82 | switch (id) {
83 | case R.id.action_search:
84 | tip = "搜索";
85 | break;
86 | case R.id.action_add:
87 | tip = "添加";
88 | break;
89 | case R.id.action_setting:
90 | tip = "设置";
91 | break;
92 | case R.id.action_help:
93 | tip = "帮助";
94 | break;
95 | }
96 | Toast.makeText(ToolBarActivity.this, tip, Toast.LENGTH_SHORT).show();
97 | return false;
98 | }
99 | });
100 | ;
101 | }
102 |
103 | /**
104 | * 设置左侧菜单条目的标题
105 | */
106 | private void initMenuTitles() {
107 | mMenuTitles = getResources().getStringArray(R.array.menuTitles);
108 | ArrayAdapter arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, mMenuTitles);
109 | mLvList.setAdapter(arrayAdapter);
110 | mLvList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
111 | @Override
112 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
113 | switchFragment(position);//切换fragment
114 | mDrawerLayout.closeDrawers();//收起DrawerLayout
115 | }
116 | });
117 | }
118 |
119 | private void initFragments() {
120 | ContentFragment fragment1 = new ContentFragment();
121 | Bundle bundle1 = new Bundle();
122 | bundle1.putString(ContentFragment.TEXT,getString(R.string.menu_local_music));
123 | fragment1.setArguments(bundle1);
124 |
125 |
126 | ContentFragment fragment2 = new ContentFragment();
127 | Bundle bundle2 = new Bundle();
128 | bundle2.putString(ContentFragment.TEXT,getString(R.string.menu_net_music));
129 | fragment2.setArguments(bundle2);
130 |
131 | mFragments.add(fragment1);
132 | mFragments.add(fragment2);
133 | }
134 |
135 |
136 | /**
137 | * 初始化DrawerLayout
138 | */
139 | private void initDrawerLayout() {
140 | mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,mToolbar, R.string.open, R.string.close);
141 |
142 | mDrawerToggle.syncState();;//同步
143 |
144 | mDrawerLayout.setDrawerListener(mDrawerToggle);
145 |
146 | switchFragment(0);
147 | }
148 |
149 |
150 | /**
151 | * 切换fragment
152 | * @param index 下标
153 | */
154 | private void switchFragment(int index) {
155 | ContentFragment contentFragment = mFragments.get(index);
156 | FragmentManager fragmentManager = getSupportFragmentManager();
157 | FragmentTransaction transaction = fragmentManager.beginTransaction();
158 | transaction.replace(R.id.fl_content,contentFragment);
159 | transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
160 | transaction.commit();
161 | }
162 | }
163 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/adapter/MyListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import com.chaychan.md.R;
11 | import com.chaychan.md.bean.DataBean;
12 |
13 | import java.util.List;
14 |
15 | public class MyListAdapter extends RecyclerView.Adapter {
16 |
17 | private List list;
18 | private Context context;
19 |
20 | public MyListAdapter(Context context, List list) {
21 | this.list = list;
22 | this.context = context;
23 | }
24 |
25 | /**创建条目布局*/
26 | @Override
27 | public MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {
28 | View view = View.inflate(context, R.layout.item_list, null);
29 | return new MyHolder(view);
30 | }
31 |
32 | /**绑定数据*/
33 | @Override
34 | public void onBindViewHolder(MyHolder myHolder, int position) {
35 | myHolder.setDataAndRefreshUI(list.get(position));
36 | }
37 |
38 | @Override
39 | public int getItemCount() {
40 | return list.size();
41 | }
42 |
43 | public class MyHolder extends RecyclerView.ViewHolder{
44 | private ImageView mIv;
45 | private TextView mTv;
46 |
47 | public MyHolder(View itemView) {
48 | super(itemView);
49 | mIv = (ImageView) itemView.findViewById(R.id.iv_icon);
50 | mTv = (TextView) itemView.findViewById(R.id.tv_name);
51 | itemView.setOnClickListener(new View.OnClickListener() {
52 | @Override
53 | public void onClick(View v) {
54 | if (mOnItemClickListener != null){
55 | mOnItemClickListener.onItemClick(v,getPosition());
56 | }
57 | }
58 | });
59 | }
60 |
61 | public void setDataAndRefreshUI(DataBean dataBean){
62 | mIv.setImageResource(dataBean.iconId);
63 | mTv.setText(dataBean.content);
64 | }
65 | }
66 |
67 | public interface MyItemClickListener {
68 | public void onItemClick(View view,int postion);
69 | }
70 |
71 | private MyItemClickListener mOnItemClickListener;
72 |
73 | public void setOnItemClickListener(MyItemClickListener listener){
74 | this.mOnItemClickListener = listener;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/adapter/MyStaggerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import com.chaychan.md.R;
11 | import com.chaychan.md.bean.DataBean;
12 |
13 | import java.util.List;
14 |
15 | public class MyStaggerAdapter extends RecyclerView.Adapter {
16 |
17 | private List list;
18 | private Context context;
19 |
20 | public MyStaggerAdapter(Context context, List list) {
21 | this.list = list;
22 | this.context = context;
23 | }
24 |
25 | /**创建条目布局*/
26 | @Override
27 | public MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {
28 | View view = View.inflate(context, R.layout.item_stragger, null);
29 | return new MyHolder(view);
30 | }
31 |
32 | /**绑定数据*/
33 | @Override
34 | public void onBindViewHolder(MyHolder myHolder, int position) {
35 | myHolder.setDataAndRefreshUI(list.get(position));
36 | }
37 |
38 | @Override
39 | public int getItemCount() {
40 | return list.size();
41 | }
42 |
43 | public class MyHolder extends RecyclerView.ViewHolder{
44 | private ImageView mIv;
45 | private TextView mTv;
46 |
47 | public MyHolder(View itemView) {
48 | super(itemView);
49 | mIv = (ImageView) itemView.findViewById(R.id.item_straggered_iv);
50 | mTv = (TextView) itemView.findViewById(R.id.item_straggered_tv);
51 | }
52 |
53 | public void setDataAndRefreshUI(DataBean dataBean){
54 | mIv.setImageResource(dataBean.iconId);
55 | mTv.setText(dataBean.content);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/adapter/PaletteTabAdapter.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.adapter;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentStatePagerAdapter;
6 |
7 | import com.chaychan.md.fragment.PicFragment;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * @author ChayChan
13 | * @date 2017/8/1 22:09
14 | */
15 |
16 | public class PaletteTabAdapter extends FragmentStatePagerAdapter{
17 |
18 | private List mFragments;
19 | private String[] mTitles;
20 |
21 | public PaletteTabAdapter(FragmentManager fm, List fragments,String[] titles) {
22 | super(fm);
23 | mFragments = fragments;
24 | mTitles = titles;
25 | }
26 |
27 | @Override
28 | public Fragment getItem(int position) {
29 | return mFragments.get(position);
30 | }
31 |
32 | @Override
33 | public int getCount() {
34 | return mFragments.size();
35 | }
36 |
37 | @Override
38 | public CharSequence getPageTitle(int position) {
39 | return mTitles[position];
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/adapter/RvListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.TextView;
8 |
9 | import com.chaychan.md.R;
10 |
11 | import java.util.List;
12 |
13 | /**
14 | * @author ChayChan
15 | * @date 2017/8/3 17:28
16 | */
17 |
18 | public class RvListAdapter extends RecyclerView.Adapter {
19 |
20 | private Context mContext;
21 | private List mDatas;
22 |
23 | public RvListAdapter(Context context, List datas) {
24 | mContext = context;
25 | mDatas = datas;
26 | }
27 |
28 | @Override
29 | public MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {
30 | View view = View.inflate(mContext, R.layout.item_list2, null);
31 | return new MyHolder(view);
32 | }
33 |
34 | @Override
35 | public void onBindViewHolder(MyHolder holder, int position) {
36 | holder.setDataAndRefreshUI(mDatas.get(position));
37 | }
38 |
39 | @Override
40 | public int getItemCount() {
41 | return mDatas.size();
42 | }
43 |
44 | public class MyHolder extends RecyclerView.ViewHolder{
45 |
46 | private TextView mTv;
47 |
48 | public MyHolder(View itemView) {
49 | super(itemView);
50 | mTv = (TextView) itemView.findViewById(R.id.tv);
51 | }
52 |
53 | public void setDataAndRefreshUI(String content){
54 | mTv.setText(content);
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/adapter/TabAdapter.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.adapter;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentStatePagerAdapter;
6 |
7 | import com.chaychan.md.fragment.ContentFragment;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * @author ChayChan
13 | * @date 2017/7/30 20:33
14 | */
15 |
16 | public class TabAdapter extends FragmentStatePagerAdapter {
17 |
18 | private List mFragments;
19 | private String[] mTitles;
20 |
21 | public TabAdapter(FragmentManager fm, List fragments,String[] titles) {
22 | super(fm);
23 | mFragments = fragments;
24 | mTitles = titles;
25 | }
26 |
27 | @Override
28 | public Fragment getItem(int position) {
29 | return mFragments.get(position);
30 | }
31 |
32 | @Override
33 | public int getCount() {
34 | return mFragments.size();
35 | }
36 |
37 | @Override
38 | public CharSequence getPageTitle(int position) {
39 | return mTitles[position];
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/bean/DataBean.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.bean;
2 |
3 | public class DataBean {
4 | public int iconId;
5 | public String content;
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/bean/DemoBean.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.bean;
2 |
3 | public class DemoBean {
4 | public String name;
5 | public Class> clazz;
6 |
7 | public DemoBean(String name, Class> clazz) {
8 | this.name = name;
9 | this.clazz = clazz;
10 | }
11 |
12 | @Override
13 | public String toString() {
14 | return name;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/fragment/ContentFragment.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.Gravity;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.TextView;
11 |
12 | /**
13 | * @author ChayChan
14 | * @date 2017/7/24 19:33
15 | */
16 |
17 | public class ContentFragment extends Fragment {
18 |
19 | public static final String TEXT = "text";
20 |
21 | @Nullable
22 | @Override
23 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
24 | String text = getArguments().getString(TEXT);
25 | TextView textView = new TextView(getContext());
26 | textView.setGravity(Gravity.CENTER);
27 | textView.setText(text);
28 | return textView;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/fragment/PicFragment.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.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.ImageView;
10 |
11 | /**
12 | * @author ChayChan
13 | */
14 |
15 | public class PicFragment extends Fragment {
16 |
17 | public static final String IMG_RESOURCE = "ImgResourse";
18 |
19 | @Nullable
20 | @Override
21 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
22 | int imgRes = getArguments().getInt(IMG_RESOURCE);
23 | ImageView imageView = new ImageView(getContext());
24 | ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
25 | imageView.setLayoutParams(layoutParams);
26 | imageView.setScaleType(ImageView.ScaleType.FIT_XY);
27 | imageView.setImageResource(imgRes);
28 | return imageView;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/chaychan/md/utils/FileUtils.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md.utils;
2 |
3 | import android.content.Context;
4 | import android.database.Cursor;
5 | import android.provider.MediaStore;
6 |
7 | import java.io.File;
8 | import java.util.ArrayList;
9 |
10 | /**
11 | * @author ChayChan
12 | * @date 2017/7/31 20:55
13 | */
14 |
15 | public class FileUtils {
16 |
17 | /**
18 | * 根据歌名查看音乐
19 | * @param context 上下文
20 | * @param key 关键字
21 | * @return
22 | */
23 | public static String[] queryMusic(Context context, String key) {
24 | ArrayList nameList = new ArrayList<>();
25 | Cursor c = null;
26 | try {
27 | c = context.getContentResolver().query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null,
28 | MediaStore.Audio.Media.DISPLAY_NAME + " LIKE '%" + key + "%'",
29 | null,
30 | MediaStore.Audio.Media.DEFAULT_SORT_ORDER);
31 |
32 | while (c.moveToNext()) {
33 | String path = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));// 路径
34 |
35 | if (!FileUtils.isExists(path)) {
36 | continue;
37 | }
38 |
39 | String name = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.DISPLAY_NAME)); // 歌曲名
40 | nameList.add(name);
41 | }
42 |
43 | } catch (Exception e) {
44 | e.printStackTrace();
45 | } finally {
46 | if (c != null) {
47 | c.close();
48 | }
49 | }
50 | if (nameList.isEmpty()){
51 | return new String[]{};
52 | }
53 | return (String[])nameList.toArray(new String[nameList.size()]);
54 | }
55 |
56 | public static boolean isExists(String path) {
57 | File file = new File(path);
58 | return file.exists();
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_app_bar_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
20 |
21 |
26 |
27 |
33 |
34 |
35 |
36 |
37 |
38 |
43 |
44 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_card_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
24 |
25 |
30 |
31 |
39 |
40 |
47 |
48 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_palette.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
20 |
21 |
30 |
31 |
41 |
42 |
43 |
44 |
49 |
50 |
60 |
61 |
71 |
72 |
82 |
83 |
93 |
94 |
104 |
105 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_palette2.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
30 |
31 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_recycler_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_search_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_tab_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
23 |
24 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_tool_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
21 |
22 |
23 |
24 |
28 |
29 |
30 |
31 |
36 |
37 |
38 |
39 |
40 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
17 |
18 |
27 |
28 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_list2.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_stragger.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
24 |
25 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_recycler_view.xml:
--------------------------------------------------------------------------------
1 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_search_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_tool_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/beauty.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/beauty.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/book.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/book.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/colorful.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/colorful.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/flower.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g10.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g11.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g12.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g13.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g14.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g15.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g16.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g17.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g17.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g18.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g18.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g19.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g19.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g20.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g21.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g21.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g22.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g23.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g23.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g24.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g24.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g25.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g25.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g26.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g26.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g27.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g27.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g28.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g28.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g29.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g29.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g7.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g8.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/g9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/g9.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h1.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h10.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h10.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h11.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h11.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h12.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h12.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h13.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h13.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h14.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h14.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h15.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h15.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h16.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h16.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h17.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h17.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h18.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h18.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h19.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h19.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h2.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h20.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h20.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h21.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h21.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h22.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h22.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h23.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h23.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h24.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h24.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h25.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h25.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h26.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h26.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h27.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h27.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h28.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h28.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h29.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h29.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h3.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h30.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h30.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h31.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h31.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h32.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h32.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h33.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h33.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h34.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h34.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h35.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h35.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h36.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h36.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h37.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h37.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h38.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h38.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h39.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h39.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h4.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h4.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h40.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h40.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h41.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h41.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h42.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h42.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h43.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h43.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h44.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h44.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h5.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h5.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h6.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h6.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h7.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h7.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h8.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h8.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/h9.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/h9.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/head.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/ic_add.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/ic_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/ic_search.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p10.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p11.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p12.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p13.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p14.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p15.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p16.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p17.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p17.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p18.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p18.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p19.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p19.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p20.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p21.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p21.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p22.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p23.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p23.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p24.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p24.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p25.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p25.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p26.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p26.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p27.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p27.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p28.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p28.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p29.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p29.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p30.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p30.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p31.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p31.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p32.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p32.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p33.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p33.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p34.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p34.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p35.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p35.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p36.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p36.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p37.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p37.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p38.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p38.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p39.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p39.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p40.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p40.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p41.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p41.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p42.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p42.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p43.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p43.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p44.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p44.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p7.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p8.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/p9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/p9.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/scenery.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-hdpi/scenery.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xxhdpi/back.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @string/menu_local_music
5 | - @string/menu_net_music
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/array_channel.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 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #0176da
8 | #D43931
9 |
10 | #ffd8d8d8
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MaterialDesignExercise
3 | 搜索
4 | 设置
5 | 帮助
6 | 添加
7 | 打开
8 | 关闭
9 | 侧滑菜单
10 | 内容区域
11 | 本地音乐
12 | 网络音乐
13 |
14 | 战争是血淋淋的,战争是实实在在的,战争中的每一个军人都是有血有肉的。本小说恰恰注重于战术层面和细节问题,通过一个个有血有肉的军人,演绎出一段段可歌可泣的具体的战争故事!小说由始至终还贯串了一个优秀军人对特种作战的探索。在这一部小说里,你将看到的是专业的、细节的描写;在这一部小说里,情感不会作为噱头、它将平淡、真实,但却震撼。
15 | 一个富有子弟,毕业于黄埔,留学于德国。在烽火连天、民族危亡的时刻,他甘愿放弃名利、甘愿忍受各种磨难!中国历史上第一支执行特战任务的部队竟在这位文弱书生的手上诞生了。这支充满了神秘色彩的部队,其凶猛与诡异,几乎摧毁了日寇欲吞并中国的野心……
16 | 《特战先驱》第二部已上市:
17 | 迭遭惨变之后,他失去了所有的亲人和朋友,但是,作为一个军人,他牢记着他的职责——保家卫国!于是,他选择了一支抗日的队伍——八路军!在敌后战场,他如鱼得水,将特种作战发挥得淋漓尽致,猎杀日寇精锐,袭击日军主力……他用鲜血捍卫着祖国的尊严!
18 | 中华民族不屈脊梁!
19 | 一群让我们肃然起敬永记心头的战士。
20 | 我们要告诉我们的后代,告诉天下所有的热血中华儿郎,请你们永远记住往昔那苦难的岁月,记住那些昔日的英雄。中国英雄纪念碑上铭刻着他们的丰功伟绩。他们的精神永远在我们的心中!!!
21 | 当他下命令把战友的尸体堆积起来当护盾的时候,当他发表那样的激动人心的演讲的时候:“小日本要想通过我们的阵地,只有踩着我们的尸体!而我们就是死,也要多拉几个小日本垫背!阵亡的弟兄如果要怪就怪我周卫国!我周卫国发誓,如果我阵亡了,到阎王老子那里我会亲自给弟兄们赔罪!如果能够活下来,我周卫国一定倾家荡产厚葬阵亡的弟兄!”我被震撼了,我再次地流泪。 原文不是这样 说这一段话的是 陈正伦
22 | 战争是血淋淋的,战争是实实在在的,战争中的每一个军人都是有血有肉的。本小说恰恰注重于战术层面和细节问题,通过一个个有血有肉的军人,演绎出一段段可歌可泣的具体的战争故事!小说由始至终还贯串了一个优秀军人对特种作战的探索。在这一部小说里,你将看到的是专业的、细节的描写;在这一部小说里,情感不会作为噱头、它将平淡、真实,但却震撼。
23 | 一个富有子弟,毕业于黄埔,留学于德国。在烽火连天、民族危亡的时刻,他甘愿放弃名利、甘愿忍受各种磨难!中国历史上第一支执行特战任务的部队竟在这位文弱书生的手上诞生了。这支充满了神秘色彩的部队,其凶猛与诡异,几乎摧毁了日寇欲吞并中国的野心……
24 | 《特战先驱》第二部已上市:
25 | 迭遭惨变之后,他失去了所有的亲人和朋友,但是,作为一个军人,他牢记着他的职责——保家卫国!于是,他选择了一支抗日的队伍——八路军!在敌后战场,他如鱼得水,将特种作战发挥得淋漓尽致,猎杀日寇精锐,袭击日军主力……他用鲜血捍卫着祖国的尊严!
26 | 中华民族不屈脊梁!
27 | 一群让我们肃然起敬永记心头的战士。
28 | 我们要告诉我们的后代,告诉天下所有的热血中华儿郎,请你们永远记住往昔那苦难的岁月,记住那些昔日的英雄。中国英雄纪念碑上铭刻着他们的丰功伟绩。他们的精神永远在我们的心中!!!
29 | 当他下命令把战友的尸体堆积起来当护盾的时候,当他发表那样的激动人心的演讲的时候:“小日本要想通过我们的阵地,只有踩着我们的尸体!而我们就是死,也要多拉几个小日本垫背!阵亡的弟兄如果要怪就怪我周卫国!我周卫国发誓,如果我阵亡了,到阎王老子那里我会亲自给弟兄们赔罪!如果能够活下来,我周卫国一定倾家荡产厚葬阵亡的弟兄!”我被震撼了,我再次地流泪。 原文不是这样 说这一段话的是 陈正伦
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
17 |
18 |
19 |
23 |
24 |
25 |
28 |
29 |
38 |
39 |
43 |
44 |
45 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/test/java/com/chaychan/md/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.chaychan.md;
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 | }
--------------------------------------------------------------------------------
/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.1'
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 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaychan/MaterialDesignExercise/7fa823f4939bb9b80ddab360792129e644bb998a/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jul 24 08:25:35 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:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------