-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
376 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 20 additions & 35 deletions
55
app/src/main/java/dhu/cst/zhangxuhong171310126/dhuguider/activities/WelcomeActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,37 @@ | ||
package dhu.cst.zhangxuhong171310126.dhuguider.activities; | ||
|
||
import android.graphics.Color; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.view.WindowManager; | ||
import android.os.Handler; | ||
import android.os.Message; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.xuexiang.xui.widget.guidview.GuideCaseView; | ||
|
||
import dhu.cst.zhangxuhong171310126.dhuguider.R; | ||
|
||
import static java.lang.Thread.sleep; | ||
|
||
public class WelcomeActivity extends AppCompatActivity { | ||
private Handler handler; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_welcome); | ||
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | ||
} | ||
|
||
public void click_use(View v){ | ||
finish(); | ||
} | ||
|
||
public void click_btn1(View v){ | ||
new GuideCaseView.Builder(this) | ||
.focusRectAtPosition(320, 650, 230, 75) | ||
.roundRectRadius(60) | ||
.focusBorderColor(Color.GREEN) | ||
.build() | ||
.show(); | ||
} | ||
|
||
public void click_btn2(View v) { | ||
new GuideCaseView.Builder(this) | ||
.focusRectAtPosition(535, 650, 230, 75) | ||
.roundRectRadius(60) | ||
.focusBorderColor(Color.GREEN) | ||
.build() | ||
.show(); | ||
handler=new RedirectHandler(); | ||
new Thread(() -> { | ||
try { | ||
sleep(1000); | ||
handler.sendMessage(new Message()); | ||
} catch (InterruptedException e) { | ||
handler.sendMessage(new Message()); | ||
} | ||
}).start(); | ||
} | ||
|
||
public void click_btn3(View v) { | ||
new GuideCaseView.Builder(this) | ||
.focusRectAtPosition(320, 745, 230, 75) | ||
.roundRectRadius(60) | ||
.focusBorderColor(Color.GREEN) | ||
.build() | ||
.show(); | ||
private class RedirectHandler extends Handler{ | ||
@Override | ||
public void handleMessage(@NonNull Message msg) { | ||
finish(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#FF16BF" | ||
android:viewportHeight="24" android:viewportWidth="24" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#FFFFFF" | ||
android:viewportHeight="24" android:viewportWidth="24" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="@android:color/white" android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/> | ||
</vector> |
Oops, something went wrong.