Skip to content

Commit d28adcb

Browse files
author
Eajy
committed
V2.2
1 parent 5dbc2be commit d28adcb

20 files changed

Lines changed: 176 additions & 55 deletions

app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.eajy.materialdesigndemo"
99
minSdkVersion 21
1010
targetSdkVersion 25
11-
versionCode 13
12-
versionName "2.2"
11+
versionCode 16
12+
versionName "2.5"
1313
}
1414

1515
buildTypes {
@@ -22,12 +22,13 @@ android {
2222

2323
dependencies {
2424
compile fileTree(dir: 'libs', include: ['*.jar'])
25-
testCompile 'junit:junit:4.12'
25+
2626

2727
compile 'com.android.support:appcompat-v7:25.3.1'
2828
compile 'com.android.support:support-v4:25.3.1'
2929
compile 'com.android.support:design:25.3.1'
3030
compile 'com.android.support:cardview-v7:25.3.1'
31-
3231
compile 'com.github.bumptech.glide:glide:3.7.0'
32+
compile 'com.android.support.constraint:constraint-layout:1.0.2'
33+
testCompile 'junit:junit:4.12'
3334
}

app/src/main/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/aidl

app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.eajy.materialdesigndemo">
44

5+
<uses-permission android:name="com.android.vending.BILLING" />
6+
57
<application
68
android:allowBackup="true"
79
android:icon="@mipmap/ic_launcher"
810
android:label="@string/app_name"
911
android:supportsRtl="true"
1012
android:theme="@style/AppTheme">
11-
1213
<activity
1314
android:name=".activity.MainActivity"
1415
android:label="@string/app_name"
@@ -21,48 +22,44 @@
2122
<category android:name="android.intent.category.LAUNCHER" />
2223
</intent-filter>
2324
</activity>
24-
2525
<activity
2626
android:name=".activity.LoginActivity"
2727
android:label="@string/title_activity_login"
2828
android:parentActivityName=".activity.MainActivity" />
29-
3029
<activity
3130
android:name=".activity.RecyclerViewActivity"
3231
android:label="@string/title_activity_recycler_view"
3332
android:parentActivityName=".activity.MainActivity"
3433
android:theme="@style/AppTheme.NoActionBar_StatusBar" />
35-
3634
<activity
3735
android:name=".activity.ShareViewActivity"
3836
android:label="@string/title_activity_share_view"
3937
android:theme="@style/AppTheme.NoActionBar_StatusBar" />
40-
4138
<activity
4239
android:name=".activity.ScrollingActivity"
4340
android:label="@string/title_activity_scrolling"
4441
android:parentActivityName=".activity.MainActivity"
4542
android:theme="@style/AppTheme.NoActionBar" />
46-
4743
<activity
4844
android:name=".activity.FullscreenActivity"
4945
android:configChanges="orientation|keyboardHidden|screenSize"
5046
android:theme="@style/FullscreenTheme" />
51-
5247
<activity
5348
android:name=".activity.BottomNavigationActivity"
5449
android:theme="@style/AppTheme.NoActionBar" />
55-
5650
<activity
5751
android:name=".activity.SettingsActivity"
5852
android:label="@string/title_activity_settings"
5953
android:parentActivityName=".activity.MainActivity" />
60-
6154
<activity
6255
android:name=".activity.AboutActivity"
6356
android:label="@string/title_activity_about"
6457
android:parentActivityName=".activity.MainActivity" />
65-
58+
<activity
59+
android:name=".activity.DonateActivity"
60+
android:label="@string/activity_donate"
61+
android:parentActivityName=".activity.MainActivity"
62+
android:theme="@style/AppTheme.NoActionBar_StatusBar" />
6663
</application>
6764

6865
</manifest>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/billing
2+
/activity/DonateActivity.java

app/src/main/java/com/eajy/materialdesigndemo/Constant.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ public class Constant {
88
public static String APP_URL = "https://play.google.com/store/apps/details?id=com.eajy.materialdesigndemo";
99
public static String DESIGNED_BY = "Designed by Eajy in China";
1010
public static String SHARE_CONTENT = "A beautiful app designed with Material Design:\n" + APP_URL + "\n- " + DESIGNED_BY;
11-
public static String EMAIL = "mailto:zhangxiao.eajy@gmail.com";
12-
public static String GOOGLE_PLUS = "https://plus.google.com/102787638260931600665";
11+
public static String EMAIL = "mailto:eajy.zhangxiao@gmail.com";
1312
public static String GIT_HUB = "https://github.com/Eajy/MaterialDesignDemo";
1413

1514
public static String MATERIAL_DESIGN_COLOR_URL = "https://play.google.com/store/apps/details?id=com.eajy.materialdesigncolor";

app/src/main/java/com/eajy/materialdesigndemo/activity/AboutActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public void onClick(View view) {
7878
intent.setAction(Intent.ACTION_SENDTO);
7979
intent.setData(Uri.parse(Constant.EMAIL));
8080
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.about_email_intent));
81+
//intent.putExtra(Intent.EXTRA_TEXT, "Hi,");
8182
try {
8283
startActivity(intent);
8384
} catch (Exception e) {

app/src/main/java/com/eajy/materialdesigndemo/activity/MainActivity.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,9 @@ public boolean onNavigationItemSelected(MenuItem item) {
273273
startActivity(intent);
274274
break;
275275

276-
case R.id.nav_feedback:
277-
intent.setAction(Intent.ACTION_SENDTO);
278-
intent.setData(Uri.parse(Constant.EMAIL));
279-
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.main_feedback_email));
280-
//intent.putExtra(Intent.EXTRA_TEXT, "Hi,");
281-
try {
282-
startActivity(intent);
283-
} catch (Exception e) {
284-
Toast.makeText(MainActivity.this, getString(R.string.main_not_found_email), Toast.LENGTH_SHORT).show();
285-
}
276+
case R.id.nav_donate:
277+
intent.setClass(this, DonateActivity.class);
278+
startActivity(intent);
286279
break;
287280

288281
case R.id.nav_color:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true"
8+
tools:context="com.eajy.materialdesigndemo.activity.DonateActivity">
9+
10+
<android.support.design.widget.AppBarLayout
11+
android:layout_width="match_parent"
12+
android:layout_height="@dimen/app_bar_height"
13+
android:theme="@style/AppTheme.AppBarOverlay">
14+
15+
<android.support.v7.widget.Toolbar
16+
android:id="@+id/toolbar_donate"
17+
android:layout_width="match_parent"
18+
android:layout_height="?attr/actionBarSize"
19+
android:background="?attr/colorPrimary"
20+
app:popupTheme="@style/AppTheme.PopupOverlay" />
21+
22+
<TextView
23+
android:id="@+id/tv_donate_title"
24+
android:layout_width="match_parent"
25+
android:layout_height="match_parent"
26+
android:layout_marginBottom="@dimen/text_margin"
27+
android:layout_marginEnd="@dimen/text_margin"
28+
android:layout_marginStart="72dp"
29+
android:layout_marginTop="@dimen/text_margin"
30+
android:gravity="center_vertical"
31+
android:lineSpacingExtra="8dp"
32+
android:text="@string/donate_title"
33+
android:textColor="@color/white"
34+
android:textSize="16sp" />
35+
36+
</android.support.design.widget.AppBarLayout>
37+
38+
<include layout="@layout/content_donate" />
39+
40+
</android.support.design.widget.CoordinatorLayout>
41+
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
app:layout_behavior="@string/appbar_scrolling_view_behavior"
8+
tools:context="com.eajy.materialdesigndemo.activity.DonateActivity"
9+
tools:showIn="@layout/activity_donate">
10+
11+
<LinearLayout
12+
android:layout_width="match_parent"
13+
android:layout_height="match_parent"
14+
android:layout_marginBottom="@dimen/activity_vertical_margin"
15+
android:layout_marginLeft="@dimen/activity_horizontal_margin"
16+
android:layout_marginRight="@dimen/activity_horizontal_margin"
17+
android:layout_marginTop="@dimen/activity_vertical_margin"
18+
android:orientation="vertical">
19+
20+
<RelativeLayout
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:layout_marginBottom="@dimen/text_margin"
24+
android:layout_marginTop="@dimen/text_margin">
25+
26+
<ImageView
27+
android:id="@+id/img_donate_low"
28+
android:layout_width="wrap_content"
29+
android:layout_height="wrap_content"
30+
android:layout_marginEnd="@dimen/text_margin"
31+
android:layout_centerVertical="true"
32+
android:src="@mipmap/ic_attach_money_black_24dp"
33+
android:tint="@color/colorAccent" />
34+
35+
<TextView
36+
android:layout_width="wrap_content"
37+
android:layout_height="wrap_content"
38+
android:layout_centerVertical="true"
39+
android:layout_marginStart="@dimen/text_margin"
40+
android:layout_toEndOf="@+id/img_donate_low"
41+
android:text="@string/donate_low"
42+
android:textColor="@color/colorAccent"
43+
android:textSize="16sp" />
44+
45+
<Button
46+
android:id="@+id/btn_donate_low"
47+
android:layout_width="wrap_content"
48+
android:layout_height="wrap_content"
49+
android:layout_alignParentEnd="true"
50+
android:text="@string/activity_donate" />
51+
</RelativeLayout>
52+
53+
<RelativeLayout
54+
android:layout_width="match_parent"
55+
android:layout_height="wrap_content"
56+
android:layout_marginBottom="@dimen/text_margin"
57+
android:layout_marginTop="@dimen/text_margin">
58+
59+
<ImageView
60+
android:id="@+id/img_donate_high"
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
63+
android:layout_marginEnd="@dimen/text_margin"
64+
android:layout_centerVertical="true"
65+
android:src="@mipmap/ic_attach_money_black_24dp"
66+
android:tint="@color/colorAccent" />
67+
68+
<TextView
69+
android:layout_width="wrap_content"
70+
android:layout_height="wrap_content"
71+
android:layout_centerVertical="true"
72+
android:layout_marginStart="@dimen/text_margin"
73+
android:layout_toEndOf="@+id/img_donate_high"
74+
android:text="@string/donate_high"
75+
android:textColor="@color/colorAccent"
76+
android:textSize="16sp" />
77+
78+
<Button
79+
android:id="@+id/btn_donate_high"
80+
android:layout_width="wrap_content"
81+
android:layout_height="wrap_content"
82+
android:layout_alignParentEnd="true"
83+
android:text="@string/activity_donate" />
84+
</RelativeLayout>
85+
86+
</LinearLayout>
87+
</android.support.v4.widget.NestedScrollView>

app/src/main/res/menu/activity_main_drawer.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
android:icon="@drawable/ic_info_black_24dp"
3232
android:title="@string/nav_about_this" />
3333
<item
34-
android:id="@+id/nav_feedback"
35-
android:icon="@mipmap/ic_feedback_black_24dp"
36-
android:title="@string/nav_feedback" />
34+
android:id="@+id/nav_donate"
35+
android:icon="@mipmap/ic_attach_money_black_24dp"
36+
android:title="@string/nav_donate" />
3737
</menu>
3838
</item>
3939

0 commit comments

Comments
 (0)