Skip to content

Commit

Permalink
del
Browse files Browse the repository at this point in the history
  • Loading branch information
JackuXL committed Aug 9, 2021
1 parent a860117 commit f8fb90b
Show file tree
Hide file tree
Showing 20 changed files with 354 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

### 预览图片

![预览图片](https://ae01.alicdn.com/kf/U709cedf0d260414989ab0899f9a24b88g.jpg)
![预览图片](https://i.loli.net/2021/08/09/PZ8RA1GKEQ7N6rT.png)



Expand All @@ -37,7 +37,6 @@

- [官方网站](https://wmusic.wearbbs.cn)
- [Github Release](https://github.com/JackuXL/WearMusic/releases)
- [蓝奏云](https://wearbbs.lanzous.com/iMoEHl4ufsd)

> 下载后,请前往 [WearBBS](https://wearbbs.cn) 查看 [ADB 教程](https://wearbbs.cn/threads/adb.110/),以将其安装至手表。
Expand All @@ -50,10 +49,7 @@

## 预览视频

<a href = "https://www.bilibili.com/video/BV1zf4y1672n/ " target="_blank"><img src="https://ae01.alicdn.com/kf/U25829692e6b24c31abaa53afdbe2a9d2L.jpg" width="450"/><br>手表网易云?WearMusic 2.0 - 音乐的力量,听你所想~</a>

## 软件进阶
- 如何在WearMusic中听其他平台(如QQ音乐)的歌曲,同时可以查看歌词、Cover?
制作中

## 关于

Expand All @@ -62,9 +58,7 @@

WearMusic 是完全开源且免费的。同时,维护后台的[API服务器](https://music.wearbbs.cn)[更新服务器](https://wmu.wearbbs.cn)需要投入大量的资金,您可以自愿捐助我们,保证WearMusic 的正常更新、运行。

> 收款由 WearBBS 运维代收
<img src="https://ae01.alicdn.com/kf/U0bf11df727e34cb7b7ce0a3009575accV.jpg" width="450"/>
<img src="https://i.loli.net/2021/06/14/91x6Lf2UT5aqXED.png" width="450"/>


## Licence
Expand All @@ -77,4 +71,4 @@ WearMusic 是完全开源且免费的。同时,维护后台的[API服务器](h
- 基于(修改)本项目所开发的新项目,必须保留本项目对包括但不限于特定设备、地域、人群的限制,包括源代码和二进制都必须遵守此限制。
- Based on (modifying) the new project developed by this project must retain the limitations of this project including but not limited to specific devices, regions, and crowds, including source code and binary must comply with this restriction.
- 基于(修改)本项目所开发的新项目,其许可证必须包含所有这里列出的额外限制条件。
- Based on (modifying) the new project developed by this project, the license must include all additional restrictions listed here.
- Based on (modifying) the new project developed by this project, the license must include all additional restrictions listed here.
21 changes: 21 additions & 0 deletions app/src/main/java/cn/wearbbs/music/application/MyApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cn.wearbbs.music.application;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

/**
* @author JackuXL
*/
public class MyApplication extends Application {
private static Context context;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
}
public static Context getContext(){
return context;
}

}
17 changes: 17 additions & 0 deletions app/src/main/java/cn/wearbbs/music/detail/Data.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cn.wearbbs.music.detail;

/**
* @author JackuXL
*/
public class Data {
public static String versionText = "version";
public static double version = 2.2;
public static int successCode = 200;
public static int errorCode = 400;
public static int likeMode = 1;
public static int dislikeMode = 0;
public static int localMode = 1;
public static int playListMode = 3;
public static int fmMode = 3;
public static int defaultMode = 0;
}
46 changes: 46 additions & 0 deletions app/src/main/java/cn/wearbbs/music/ui/SettingActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package cn.wearbbs.music.ui;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SwitchCompat;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.Switch;

import cn.wearbbs.music.R;
import cn.wearbbs.music.util.UserInfoUtil;

/**
* @author JackuXL
*/
public class SettingActivity extends AppCompatActivity {

Switch switchFM;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_setting);
switchFM = findViewById(R.id.switch_fm);
String needFM = UserInfoUtil.getUserInfo(this,"needFM");
if("true".equals(needFM)){
switchFM.setChecked(true);
}
switchFM.setOnCheckedChangeListener((buttonView, isChecked) -> {
if(isChecked){
UserInfoUtil.saveUserInfo(SettingActivity.this,"needFM","true");
}
else{
UserInfoUtil.saveUserInfo(SettingActivity.this,"needFM","false");
}
});
}
public void onClick(View view){
Intent intent = new Intent(SettingActivity.this, AboutActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}

}
22 changes: 22 additions & 0 deletions app/src/main/java/cn/wearbbs/music/ui/TipsActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package cn.wearbbs.music.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import cn.wearbbs.music.R;
import cn.wearbbs.music.util.UserInfoUtil;

public class TipsActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tips);
}
public void known(View view){
UserInfoUtil.saveUserInfo(this,"finishTips","true");
finish();
}
}
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_baseline_arrow_back_24_white.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FAFAFA"
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="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_baseline_save_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FAFAFA"
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="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_baseline_settings_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#2175F3"
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="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_baseline_sms_failed_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#2175F3"
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="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM13,14h-2v-2h2v2zM13,10h-2L11,6h2v4z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_baseline_thumb_up_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#2175F3"
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="M1,21h4L5,9L1,9v12zM23,10c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.59,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-2z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_outline_thumb_up_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#2175F3"
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="M9,21h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-2c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.58,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2zM9,9l4.34,-4.34L12,10h9v2l-3,7H9V9zM1,9h4v12H1z"/>
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1024dp"
android:height="1024dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M0,0h1024v1024h-1024z"
android:fillColor="#2175f3"/>
<path
android:pathData="M511.76,354.54a150,150 0,0 0,-150 150V621.21a49.94,49.94 0,0 0,50 50h50V537.88H395.1V504.54a116.67,116.67 0,0 1,233.33 0v33.34H561.76V671.21h50a49.93,49.93 0,0 0,50 -50V504.54A150,150 0,0 0,511.76 354.54Z"
android:fillColor="#fff"/>
</vector>
Binary file added app/src/main/res/drawable/icon_repeat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/icon_repeat_one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions app/src/main/res/layout/activity_setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FAFAFA"
android:orientation="vertical"
tools:context=".ui.SettingActivity"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">

<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="33dp"
android:background="@color/colorPrimary"
android:gravity="center"
android:onClick="onClick"
android:text="@string/setting"
android:textColor="#FFFFFF"
android:textSize="13sp" />

<Switch
android:id="@+id/switch_fm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:text="@string/checkFM" />

<TextView
android:id="@+id/tv_about"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="10dp"
android:background="@drawable/ripple_item_normal"
android:gravity="center_vertical"
android:onClick="onClick"
android:paddingLeft="25dp"
android:paddingTop="5dp"
android:paddingRight="25dp"
android:paddingBottom="5dp"
android:text="@string/aboutApp"
android:textColor="#242423" />

</LinearLayout>
53 changes: 53 additions & 0 deletions app/src/main/res/layout/activity_tips.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.TipsActivity">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/ll_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="33dp"
android:background="@color/colorPrimary"
android:gravity="center"
android:text="@string/tips"
android:textColor="#FFFFFF"
android:textSize="13sp" />

<TextView
android:id="@+id/tv_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:gravity="center"
android:text="@string/tip" />

<Button
android:id="@+id/btn_known"
android:layout_width="wrap_content"
android:layout_height="37dp"
android:layout_gravity="center"
android:layout_marginTop="5dp"
android:layout_marginBottom="10dp"
android:background="@drawable/btn_blue"
android:onClick="known"
android:text="@string/known"
android:textColor="#FFFFFF" />
</LinearLayout>
</ScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
Loading

0 comments on commit f8fb90b

Please sign in to comment.