Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4f22feb

Browse files
author
chenyouwei
committed
feat:修改ui
1 parent e2f2fc1 commit 4f22feb

File tree

7 files changed

+116
-84
lines changed

7 files changed

+116
-84
lines changed

‎.idea/codeStyles/Project.xml‎

Lines changed: 10 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/gradle.xml‎

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/misc.xml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎app/build.gradle‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,7 @@ dependencies {
9292

9393
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1'
9494
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1'
95+
96+
implementation "io.reactivex.rxjava2:rxandroid:2.0.2"
97+
implementation "io.reactivex.rxjava2:rxjava:2.1.12"
9598
}

‎app/src/main/java/com/hugh/basis/puzzleGame/PuzzleActivity.java‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import android.os.Bundle;
66
import android.support.annotation.Nullable;
77
import android.support.v7.app.AppCompatActivity;
8+
import android.util.Log;
89
import android.widget.ImageView;
10+
import android.widget.SeekBar;
911

1012
import com.hugh.basis.R;
1113

@@ -28,13 +30,40 @@ public class PuzzleActivity extends AppCompatActivity {
2830
private ImageView mIv2;
2931
private ImageView mIv3;
3032
private ImageView mIv4;
33+
private SeekBar mSeekBar;
3134

3235

3336
@Override
3437
protected void onCreate(@Nullable Bundle savedInstanceState) {
3538
super.onCreate(savedInstanceState);
3639
// setContentView(R.layout.activity_puzzle);
3740
setContentView(R.layout.activity_vdhblog);
41+
mSeekBar = findViewById(R.id.seekBar);
42+
mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
43+
@Override
44+
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
45+
Log.e("aaa","progress---"+progress);
46+
if(progress<=15){
47+
mSeekBar.setProgress(0);
48+
}else if(progress<=45){
49+
mSeekBar.setProgress(30);
50+
}else if(progress<=60){
51+
mSeekBar.setProgress(60);
52+
}else {
53+
mSeekBar.setProgress(100);
54+
}
55+
}
56+
57+
@Override
58+
public void onStartTrackingTouch(SeekBar seekBar) {
59+
60+
}
61+
62+
@Override
63+
public void onStopTrackingTouch(SeekBar seekBar) {
64+
65+
}
66+
});
3867
// mIv1 = findViewById(R.id.iv_1);
3968
// mIv2 = findViewById(R.id.iv_2);
4069
// mIv3 = findViewById(R.id.iv_3);

‎app/src/main/res/drawable/thumb.xml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3+
<corners android:radius="360dp"/>
4+
<gradient android:startColor="#86E354"
5+
android:endColor="#2DC22A"/>
6+
</shape>
Lines changed: 64 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,72 @@
1-
<com.hugh.basis.puzzleGame.VDHLayout xmlns:android="http://schemas.android.com/apk/res/android"
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
22
xmlns:tools="http://schemas.android.com/tools"
33
android:layout_width="match_parent"
44
android:layout_height="match_parent"
55
android:orientation="vertical">
66

7-
<TextView
8-
android:layout_width="100dp"
9-
android:layout_height="100dp"
10-
android:layout_gravity="center"
11-
android:layout_margin="10dp"
12-
android:background="#44ff0000"
13-
android:clickable="true"
14-
android:gravity="center"
15-
android:text="I can be dragged !" />
7+
<LinearLayout
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:orientation="vertical">
11+
<TextView
12+
android:layout_width="wrap_content"
13+
android:layout_height="wrap_content"
14+
android:text="定时提醒"
15+
android:textColor="#ff2a2e34"
16+
android:textSize="14sp"/>
17+
<SeekBar
18+
android:layout_marginLeft="15dp"
19+
android:layout_marginRight="15dp"
20+
android:id="@+id/seekBar"
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:max="100"
24+
android:progress="0"/>
1625

17-
<TextView
18-
android:layout_width="100dp"
19-
android:layout_height="100dp"
20-
android:layout_gravity="center"
21-
android:layout_margin="10dp"
22-
android:background="#8800ff00"
23-
android:clickable="true"
24-
android:gravity="center"
25-
android:text="i will back to origin pos !" />
26+
<LinearLayout
27+
android:layout_marginLeft="15dp"
28+
android:layout_marginRight="15dp"
29+
android:layout_width="match_parent"
30+
android:layout_height="wrap_content">
31+
<TextView
32+
android:layout_width="wrap_content"
33+
android:layout_height="wrap_content"
34+
android:text="关闭"
35+
android:textColor="#ff2a2e34"
36+
android:textSize="14sp"/>
37+
<View
38+
android:layout_width="0dp"
39+
android:layout_height="1dp"
40+
android:layout_weight="1"/>
41+
<TextView
42+
android:layout_width="wrap_content"
43+
android:layout_height="wrap_content"
44+
android:text="30min"
45+
android:textColor="#ff2a2e34"
46+
android:textSize="14sp"/>
47+
<View
48+
android:layout_width="0dp"
49+
android:layout_height="1dp"
50+
android:layout_weight="1"/>
51+
<TextView
52+
android:layout_width="wrap_content"
53+
android:layout_height="wrap_content"
54+
android:text="1h"
55+
android:textColor="#ff2a2e34"
56+
android:textSize="14sp"/>
57+
<View
58+
android:layout_width="0dp"
59+
android:layout_height="1dp"
60+
android:layout_weight="1"/>
61+
<TextView
62+
android:layout_width="wrap_content"
63+
android:layout_height="wrap_content"
64+
android:text="2h"
65+
android:textColor="#ff2a2e34"
66+
android:textSize="14sp"/>
2667

27-
<TextView
28-
android:layout_width="100dp"
29-
android:layout_height="100dp"
30-
android:layout_gravity="center"
31-
android:layout_margin="10dp"
32-
android:background="#880000ff"
33-
android:clickable="true"
34-
android:gravity="center"
35-
android:text="use edge tracker to operate me !" />
68+
</LinearLayout>
3669

37-
</com.hugh.basis.puzzleGame.VDHLayout>
70+
</LinearLayout>
71+
72+
</LinearLayout>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /