Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
itning committed Feb 8, 2020
1 parent 8f78912 commit 9448a6a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/main/java/top/itning/getupearly/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public class MainActivity extends AppCompatActivity {
* 微博早起奖金
*/
private static final String WEIBO_GET_UP_EARLY_URL = "https://getup.sc.weibo.com/home";
/**
* 支付宝早起打卡挑战赛
*/
private static final String ALI_SPORTS_SERVER_URL_SCHEME = "alipays://platformapi/startapp?appId=20000067&url=https%3a%2f%2factivity-alisports.taobao.com%2fgetup";

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -87,6 +91,10 @@ public void onBtnClick(View view) {
startUrlScheme(ALI_SPORT_URL_SCHEME);
break;
}
case R.id.ali_sport_server: {
startUrlScheme(ALI_SPORTS_SERVER_URL_SCHEME);
break;
}
default:
Toast.makeText(this, "未知选项", Toast.LENGTH_LONG).show();
}
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
android:text="@string/weibo_get_up_early_str"
android:textColor="#fff" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/ali_sport_server"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#fff"
android:backgroundTint="@color/colorPrimary"
android:foreground="?attr/selectableItemBackground"
android:onClick="onBtnClick"
android:text="@string/ali_sport_server_str"
android:textColor="#fff" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/ali_tree"
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<string name="ali_tree_str">蚂蚁森林</string>
<string name="ali_sport_str">支付宝运动</string>
<string name="ali_manor_str">蚂蚁庄园</string>
<string name="ali_sport_server_str">支付宝早起打卡挑战赛</string>
</resources>

0 comments on commit 9448a6a

Please sign in to comment.