Skip to content

Commit 5aceb5e

Browse files
committed
1
1 parent b478a60 commit 5aceb5e

File tree

7 files changed

+49
-6
lines changed

7 files changed

+49
-6
lines changed

app/build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@ dependencies {
4444
implementation 'de.hdodenhof:circleimageview:2.2.0'
4545
//文字垂直滚动
4646
implementation 'com.xiaosu:VerticalRollingTextView:2.0.9'
47-
47+
implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
48+
implementation 'com.jakewharton:butterknife:8.8.1'
49+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
4850
}

app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
android:label="@string/app_name"
3232
android:roundIcon="@mipmap/ic_launcher_round"
3333
android:supportsRtl="true"
34-
android:theme="@style/AppTheme">
34+
android:theme="@style/Theme.AppCompat.NoActionBar">
3535
<meta-data
3636
android:name="com.amap.api.v2.apikey"
3737
android:value="95bc47aac587ecf33b33c66d1ee2c590" />

app/src/main/java/com/example/mengqi/sportsdemo/Activity/FirstActivity.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
package com.example.mengqi.sportsdemo.Activity;
22

3+
import android.graphics.Color;
4+
import android.os.Build;
35
import android.support.v4.app.Fragment;
46
import android.support.v4.app.FragmentManager;
57
import android.support.v4.view.ViewPager;
68
import android.support.v7.app.AppCompatActivity;
79
import android.os.Bundle;
10+
import android.util.Log;
811
import android.view.View;
12+
import android.view.Window;
13+
import android.widget.LinearLayout;
914
import android.widget.RelativeLayout;
15+
import android.widget.ScrollView;
1016

17+
import com.blankj.utilcode.util.BarUtils;
1118
import com.example.mengqi.sportsdemo.Adapter.TabFragmentPagerAdapter;
1219
import com.example.mengqi.sportsdemo.Fragments.Fragment_mine;
1320
import com.example.mengqi.sportsdemo.Fragments.Fragment_rank;
@@ -19,6 +26,7 @@
1926
import java.util.List;
2027

2128
public class FirstActivity extends AppCompatActivity {
29+
private static final String TAG = "FirstActivity";
2230
ViewPager mViewPager;
2331
List<Fragment> mFragmentList;
2432
RelativeLayout tab_score;
@@ -30,6 +38,13 @@ public class FirstActivity extends AppCompatActivity {
3038
protected void onCreate(Bundle savedInstanceState) {
3139
super.onCreate(savedInstanceState);
3240
setContentView(R.layout.activity_first);
41+
if (Build.VERSION.SDK_INT >= 21) {
42+
View decorView = getWindow().getDecorView();
43+
int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
44+
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
45+
decorView.setSystemUiVisibility(option);
46+
getWindow().setStatusBarColor(Color.TRANSPARENT);
47+
}
3348
mViewPager = (ViewPager) findViewById(R.id.myViewPager);
3449
mFragmentList = new ArrayList<>();
3550
tab_score = (RelativeLayout) findViewById(R.id.tab_score);

app/src/main/java/com/example/mengqi/sportsdemo/Fragments/Fragment_mine.java

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import android.view.View;
77
import android.view.ViewGroup;
88

9+
import com.blankj.utilcode.util.BarUtils;
910
import com.example.mengqi.sportsdemo.R;
1011
import com.xiaosu.view.text.DataSetAdapter;
1112
import com.xiaosu.view.text.VerticalRollingTextView;

app/src/main/res/layout/my_fragment.xml

+27-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="#29292f"
6+
android:background="#333338"
77
android:orientation="vertical">
88
<!--最外层layout-->
99
<LinearLayout
10+
android:layout_marginTop="@dimen/y63"
11+
android:id="@+id/my_fragment"
1012
android:layout_width="match_parent"
1113
android:layout_height="wrap_content"
1214
android:orientation="vertical">
@@ -67,11 +69,15 @@
6769

6870
</RelativeLayout>
6971

72+
<View
73+
android:layout_width="match_parent"
74+
android:layout_height="@dimen/y6"
75+
android:background="#29292f" />
76+
7077
<!--第二栏-->
7178
<RelativeLayout
7279
android:layout_width="match_parent"
7380
android:layout_height="@dimen/y294"
74-
android:layout_marginTop="@dimen/y6"
7581
android:background="#333338">
7682

7783
<!--累计里程-->
@@ -163,11 +169,15 @@
163169
android:src="@drawable/ic_settings" />
164170
</RelativeLayout>
165171

172+
<View
173+
android:layout_width="match_parent"
174+
android:layout_height="@dimen/y6"
175+
android:background="#29292f" />
176+
166177
<!--通知滚动条-->
167178
<LinearLayout
168179
android:layout_width="match_parent"
169180
android:layout_height="@dimen/y200"
170-
android:layout_marginTop="@dimen/y6"
171181
android:background="#333338">
172182

173183
<com.xiaosu.view.text.VerticalRollingTextView
@@ -185,11 +195,15 @@
185195
app:animInterval="3000" />
186196
</LinearLayout>
187197

198+
<View
199+
android:layout_width="match_parent"
200+
android:layout_height="@dimen/y50"
201+
android:background="#29292f" />
202+
188203
<!--九宫格第一栏-->
189204
<LinearLayout
190205
android:layout_width="match_parent"
191206
android:layout_height="@dimen/y370"
192-
android:layout_marginTop="@dimen/y50"
193207
android:gravity="center"
194208
android:background="#333338"
195209
android:orientation="horizontal">
@@ -289,6 +303,10 @@
289303

290304
</LinearLayout>
291305

306+
<View
307+
android:layout_width="match_parent"
308+
android:layout_height="@dimen/x3"
309+
android:background="#29292f" />
292310

293311
<!--九宫格第二栏-->
294312
<LinearLayout
@@ -390,6 +408,11 @@
390408
</LinearLayout>
391409
</LinearLayout>
392410

411+
<View
412+
android:layout_width="match_parent"
413+
android:layout_height="@dimen/x3"
414+
android:background="#29292f" />
415+
393416
<!--九宫格第三栏-->
394417
<LinearLayout
395418
android:layout_width="match_parent"

app/src/main/res/layout/rank_fragment.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:background="#FFFFFF"
34
android:orientation="vertical"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ buildscript {
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:3.1.2'
11+
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
1112

1213

1314
// NOTE: Do not place your application dependencies here; they belong

0 commit comments

Comments
 (0)