Skip to content

Commit cf90c35

Browse files
committed
增加了关于
1 parent 0418561 commit cf90c35

File tree

8 files changed

+99
-2
lines changed

8 files changed

+99
-2
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ android {
1818
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1919
debuggable true
2020
}
21-
debug{
21+
debug {
2222
minifyEnabled false
2323
debuggable true
2424
}
@@ -41,7 +41,7 @@ dependencies {
4141
})
4242

4343

44-
api ('com.jakewharton:butterknife:8.8.1'){
44+
api('com.jakewharton:butterknife:8.8.1') {
4545
exclude module: 'support-compat'
4646
// 解决依赖问题
4747
}

app/src/main/java/com/lifegamer/fengmaster/lifegamer/MainActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import android.widget.AdapterView;
1616
import android.widget.Spinner;
1717

18+
import com.lifegamer.fengmaster.lifegamer.fragment.AboutFragment;
1819
import com.lifegamer.fengmaster.lifegamer.fragment.achievement.AchievementFragment;
1920
import com.lifegamer.fengmaster.lifegamer.fragment.reward.RewardFragment;
2021
import com.lifegamer.fengmaster.lifegamer.fragment.HeroInfoFragment;
@@ -142,6 +143,10 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
142143
//英雄信息
143144
changeToFragment(6);
144145
break;
146+
case R.id.nav_about:
147+
//关于
148+
changeToFragment(7);
149+
break;
145150

146151
case R.id.nav_exit:
147152
//退出
@@ -195,6 +200,9 @@ private void changeToFragment(int i){
195200
case 6:
196201
changeFragment(new HeroInfoFragment());
197202
break;
203+
case 7:
204+
changeFragment(new AboutFragment());
205+
break;
198206
default:
199207

200208
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.lifegamer.fengmaster.lifegamer.fragment;
2+
3+
4+
import android.os.Bundle;
5+
import android.support.v4.app.Fragment;
6+
import android.view.LayoutInflater;
7+
import android.view.View;
8+
import android.view.ViewGroup;
9+
10+
import com.lifegamer.fengmaster.lifegamer.R;
11+
12+
/**
13+
* 关于 页面
14+
*/
15+
public class AboutFragment extends Fragment {
16+
17+
18+
public AboutFragment() {
19+
// Required empty public constructor
20+
}
21+
22+
23+
@Override
24+
public View onCreateView(LayoutInflater inflater, ViewGroup container,
25+
Bundle savedInstanceState) {
26+
27+
return inflater.inflate(R.layout.fragment_about, container, false);
28+
}
29+
30+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:viewportWidth="1024"
3+
android:viewportHeight="1024" android:width="32dp" android:height="32dp">
4+
<path android:fillColor="#FF000000"
5+
android:pathData="M885.1 512.3C827.9 593 743.8 644.2 684.5 672.6c-6.2-2.4-12.5-4.5-18.8-6.4 111.6-38.7 188-117.8 188-209.2 0-45.3-18.8-87.6-51.4-123.4 33.3-61.6 18.6-137.1 4.8-142.8-17.5-7.2-78.7 13.4-116.2 66.8-52.5-22.2-114.4-35.1-180.8-35.1-61.5 0-119.3 11.1-169.3 30.4-28.9-58.9-90.8-91.5-103.3-84.8-17.9 9.6-42.8 78.5-17.4 145.9 1.5 4.1 3.2 8.1 4.9 12.1-36.9 37.4-58.5 82.4-58.5 130.9 0 85.3 66.7 159.9 166.3 200.9-55.5 18.2-109.2 70.7-145.6 113.4-14.6 17 2.3 42.4 23.7 35.7 258.1-81.1 479.6-28.6 577.6 4.4 19.9 6.7 37.2-15.4 25.8-33.1-18.6-28.9-40.1-51.5-63.4-69.2 73.3-49 122.3-112.5 152.7-185.4 6.2-14.6-9.5-24.1-18.5-11.4z m-534.6 55.3c-61.1 0-110.6-49.5-110.6-110.6s49.5-110.6 110.6-110.6S461.1 396 461.1 457.1s-49.5 110.5-110.6 110.5z m286.8 5.3c-59.4-14.1-96.1-73.7-82-133.1 14.1-59.4 73.7-96.1 133.1-82 59.4 14.1 96.1 73.7 82 133.1-14.1 59.4-73.7 96.1-133.1 82z" />
6+
<path android:fillColor="#FF000000"
7+
android:pathData="M302.015404 468.337195a118.303549 54.00162 84.984 1 0 107.589622-9.443148 118.303549 54.00162 84.984 1 0-107.589622 9.443148Z" />
8+
<path android:fillColor="#FF000000"
9+
android:pathData="M649.353402 588.654787a54 118.3 8.331 1 0 34.281344-234.103288 54 118.3 8.331 1 0-34.281344 234.103288Z" />
10+
</vector>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
tools:context=".fragment.AboutFragment">
7+
8+
<RelativeLayout
9+
android:layout_margin="50dp"
10+
android:layout_width="match_parent"
11+
android:layout_height="match_parent">
12+
13+
<LinearLayout
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:layout_centerInParent="true"
17+
android:layout_centerHorizontal="true"
18+
android:layout_centerVertical="true"
19+
android:gravity="center"
20+
android:orientation="vertical">
21+
22+
<TextView
23+
android:textSize="16sp"
24+
android:lineSpacingExtra="2px"
25+
android:layout_width="wrap_content"
26+
android:layout_height="wrap_content"
27+
android:gravity="left"
28+
android:text="@string/about_text" />
29+
30+
<ImageView
31+
android:layout_marginTop="50dp"
32+
android:layout_width="100dp"
33+
android:layout_height="100dp"
34+
android:src="@drawable/logo" />
35+
36+
37+
</LinearLayout>
38+
39+
40+
</RelativeLayout>
41+
42+
43+
</FrameLayout>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
<item android:id="@+id/nav_setting" android:icon="@drawable/ic_nav_setting" android:title="@string/nav_setting"/>
1919
<item android:id="@+id/nav_help" android:icon="@drawable/ic_nav_help" android:title="@string/nav_help"/>
20+
<item android:id="@+id/nav_about" android:icon="@drawable/ic_nav_about" android:title="@string/nav_about"/>
2021
<item android:id="@+id/nav_exit" android:icon="@drawable/ic_exit" android:title="@string/nav_exit"/>
2122
</group>
2223

app/src/main/res/values/array.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<item>成就</item>
99
<item>统计</item>
1010
<item>个人简介</item>
11+
<item>关于</item>
1112
</string-array>
1213

1314
<integer-array name="main_sp_r">

app/src/main/res/values/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<string name="task_get_xp">任务所得经验值:</string>
2727
<string name="progress_xp">经验值</string>
2828
<string name="progress_energy">能量</string>
29+
<string name="nav_about">关于</string>
30+
31+
32+
<string name="about_text">\t\t这里是软件的作者峰少,感谢使用本软件.这个软件的创意来自于生活的灵感,但没想到已经有人先将这个想法实现了出来,类似的产品有LifeRPG,如果你有什么意见,可以在我的开源项目里提出,如果你觉得LifeRPG不错,你也可以去试试,确实是不错的APP \n \t\tGithub开源地址:https://github.com/FENG-MASTER/LifeGamer </string>
2933

3034

3135
</resources>

0 commit comments

Comments
 (0)