更新了注册系统

优化了UI显示
优化了启动速度
修复了部分UI显示异常问题
修复了部分BUG
This commit is contained in:
muqing 2023-11-26 15:14:14 +08:00
parent b35415f172
commit 6657cb2152
37 changed files with 460 additions and 463 deletions

View File

@ -3,7 +3,8 @@
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidLintContentDescription" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintHardcodedText" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintLabelFor" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintNonConstantResourceId" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintSetTextI18n" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ArgumentSelectionDefects" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ArrayIndexOutOfBounds" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
@ -67,6 +68,7 @@
<inspection_tool class="UnusedExpressionResult" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedLocalVariable" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedParameter" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedReturnValue" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedValue" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ValueMayNotFitIntoReceiver" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="VirtualCallInCtorOrDtor" enabled="false" level="WARNING" enabled_by_default="false" />

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK" />
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.4883720930232558" />
<option name="scale" value="0.75" />
</ProjectState>
</option>
</component>

View File

@ -11,14 +11,14 @@ android {
}
}
namespace 'com.muqingbfq'
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "com.muqingbfq"
minSdk 23
//noinspection OldTargetApi
targetSdk 31
versionCode 1
versionName "1.6.7"
versionName "1.6.8"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@ -42,14 +42,15 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
implementation 'com.github.Moriafly:LyricViewX:1.4.0-alpha02'
implementation 'com.github.wangchenyan:lrcview:2.2.1'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation("androidx.media3:media3-exoplayer:1.1.1")
implementation("androidx.media3:media3-session:1.1.1")
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation("androidx.media3:media3-exoplayer:1.2.0")
}

View File

@ -12,8 +12,8 @@
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.6.7",
"outputFile": "Cloud_music-debug-v1.6.7.apk"
"versionName": "1.6.8",
"outputFile": "Cloud_music-debug-v1.6.8.apk"
}
],
"elementType": "File"

View File

@ -34,13 +34,11 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.云音乐"
android:theme="@style/Theme.muqing"
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
tools:targetApi="s">
<activity
android:name=".start"
android:configChanges="uiMode"
android:name=".home"
android:exported="true"
android:theme="@style/Theme.main">
<intent-filter>
@ -60,22 +58,13 @@
<activity android:name=".fragment.mp3" />
<activity android:name=".activity_about_software" />
<activity android:name=".sz" />
<activity
android:name=".home"
android:configChanges="screenSize|smallestScreenSize|orientation|screenLayout"
android:exported="false" />
<activity android:name=".mq.llq" />
<activity android:name=".yc" />
<activity android:name=".login.cookie" />
<service
android:name=".bfqkz"
android:exported="false"
android:permission="TODO">
<intent-filter>
<action android:name="androidx.media3.session.MediaSessionService" />
</intent-filter>
</service>
android:exported="false" />
<service android:name=".mq.floating" />
<receiver
android:name=".MyButtonClickReceiver"
@ -83,7 +72,6 @@
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
<action android:name="com.example.MY_BUTTON_CLICKED" />
</intent-filter>
</receiver>
</application>

View File

@ -140,21 +140,22 @@ public class MediaPlayer {
@SuppressLint("NotifyDataSetChanged")
private void bfui() {
Glide.with(home.appCompatActivity.getApplicationContext())
Glide.with(main.application)
.asBitmap()
.load(bfqkz.xm.picurl)
.listener(new RequestListener<Bitmap>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model,
@NonNull Target<Bitmap> target, boolean isFirstResource) {
bfqkz.notify.setBitmap(null);
bfq.bitmap = null;
bfqkz.notify.setBitmap();
return false;
}
@Override
public boolean onResourceReady(@NonNull Bitmap bitmap, @NonNull Object model, Target<Bitmap> target,
@NonNull DataSource dataSource, boolean isFirstResource) {
bfqkz.notify.setBitmap(bitmap);
bfq.bitmap = bitmap;
bfqkz.notify.setBitmap();
return false;
}
})

View File

@ -10,13 +10,15 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import com.muqingbfq.fragment.Media;
public class bfq extends AppCompatActivity {
@SuppressLint("StaticFieldLeak")
public static Context context;
public static AppCompatActivity context;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
context = this.getApplicationContext();
context = this;
setContentView(R.layout.activity_bfq);
Toolbar toolbar = findViewById(R.id.toolbar);
toolbar.setNavigationIcon(R.drawable.end);
@ -33,6 +35,10 @@ public class bfq extends AppCompatActivity {
}
return false;
});
if (bfqkz.xm != null) {
Media.setname(bfqkz.xm.name);
Media.setzz(bfqkz.xm.zz);
}
}
public static Bitmap bitmap;
public static void start(Context context) {
@ -41,4 +47,9 @@ public class bfq extends AppCompatActivity {
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(intent);
}
@Override
public void finish() {
super.finish();
}
}

View File

@ -82,14 +82,7 @@ public class bfqkz extends Service {
public void onPause() {
// 处理暂停音乐逻辑
mt.pause();
if(playback.getState() == PlaybackStateCompat.STATE_PLAYING){
playback = new PlaybackStateCompat.Builder()
.setState(PlaybackStateCompat.STATE_PAUSED,0,1.0f)
.build();
mSession.setPlaybackState(playback);
}
}
@Override
public void onSkipToNext() {
// 处理切换到下一首音乐逻辑

View File

@ -3,7 +3,6 @@ package com.muqingbfq.fragment;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -18,17 +17,17 @@ import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import com.bumptech.glide.Glide;
import com.dirror.lyricviewx.LyricViewX;
import com.muqingbfq.R;
import com.muqingbfq.api.url;
import com.muqingbfq.bfq;
import com.muqingbfq.bfq_an;
import com.muqingbfq.bfqkz;
import com.muqingbfq.main;
import com.muqingbfq.xm;
import org.json.JSONObject;
import me.wcy.lrcview.LrcView;
public class Media extends Fragment {
@SuppressLint("StaticFieldLeak")
public static View view;
@ -36,7 +35,7 @@ public class Media extends Fragment {
private static TextView time_a, time_b;
@SuppressLint("StaticFieldLeak")
private static SeekBar tdt;
private static LyricViewX lrcview;
private static LrcView lrcview;
public static void setTime_a(String str) {
if (time_a == null) {
@ -58,7 +57,7 @@ public class Media extends Fragment {
public static void setProgress(int progress) {
tdt.setProgress(progress);
lrcview.updateTime(progress, true);
lrcview.updateTime(progress);
}
public static void setbf(boolean bool) {
@ -85,7 +84,7 @@ public class Media extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
if (view != null) {
// main.handler.post(() -> setImageBitmap(bfq.bitmap));
main.handler.post(Media::setImageBitmap);
return view;
}
view = inflater.inflate(R.layout.fragment_bfq, container, false);
@ -95,6 +94,7 @@ public class Media extends Fragment {
view.findViewById(R.id.xyq).setOnClickListener(kz);
view.findViewById(R.id.syq).setOnClickListener(kz);
ImageView tx = view.findViewById(R.id.mttx);
tdt = view.findViewById(R.id.tdt);
tdt.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
@ -121,12 +121,12 @@ public class Media extends Fragment {
//初始化歌词组件
View kp = view.findViewById(R.id.kp1);
lrcview = getlrcView();
lrcview.setDraggable(true, (time) -> {
com.muqingbfq.bfqkz.mt.build.seekTo(Math.toIntExact(time));
return true;
lrcview.setDraggable(true, (view, time) -> {
bfqkz.mt.build.seekTo(Math.toIntExact(time));
return false;
});
if (!isTablet(bfq.context)) {
lrcview.setOnSingerClickListener(() -> {
lrcview.setOnTapListener((view, x, y) -> {
if (kp.getVisibility() == View.VISIBLE) {
kp.setVisibility(View.GONE);
} else {
@ -163,8 +163,6 @@ public class Media extends Fragment {
ImageView control = view.findViewById(R.id.control);
control.setOnClickListener(new bfq_an.control(control));
if (bfqkz.xm != null) {
setname(bfqkz.xm.name);
setzz(bfqkz.xm.zz);
main.handler.removeCallbacks(bfqkz.mt.updateSeekBar); // 在播放开始时启动更新进度
long duration = bfqkz.mt.build.getDuration();
tdt.setMax((int) bfqkz.mt.build.getDuration());
@ -198,17 +196,15 @@ public class Media extends Fragment {
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
public static LyricViewX getlrcView() {
public static LrcView getlrcView() {
if (view == null) {
return null;
}
return view.findViewById(R.id.gc);
}
public static void loadLyric(String a, String b) {
lrcview.loadLyric(a, b);
lrcview.loadLrc(a, b);
}
public static void setlike(boolean bool) {
ImageView imageView = view.findViewById(R.id.like);
int color = R.color.text;
@ -219,35 +215,36 @@ public class Media extends Fragment {
getColorStateList(view.getContext(), color));
}
public static void setImageBitmap(Bitmap bitmap) {
public static void setImageBitmap() {
if (view == null) {
return;
}
ImageView imageView = view.findViewById(R.id.mttx);
if (imageView != null) {
imageView.setImageBitmap(bitmap);
main.handler.post(() -> imageView.setImageBitmap(bfq.bitmap));
}
}
public static void setname(String str) {
if (view == null) {
if (bfq.context == null) {
return;
}
TextView name = view.findViewById(R.id.name);
TextView name = bfq.context.findViewById(R.id.name);
name.setText(str);
}
public static void setzz(String str) {
if (view == null) {
if (bfq.context == null) {
return;
}
TextView zz = view.findViewById(R.id.zz);
TextView zz = bfq.context.findViewById(R.id.zz);
zz.setText(str);
}
@Nullable
@Override
public Context getContext() {
public static Context Context() {
if (view == null) {
return null;
}
return view.getContext();
}
}

View File

@ -29,7 +29,6 @@ public class bflb_db extends BottomSheetDialog {
int height = main.g - main.g / 2 / 2;
getBehavior().setPeekHeight(height);
getBehavior().setMaxHeight(height);
try {
RecyclerView lb = findViewById(R.id.lb);
lb.setAdapter(new spq());

View File

@ -56,8 +56,6 @@ public class sz {
public static void switch_sz(Context context, int id) {
if (id == R.id.a) {
gj.llq(context, "https://rust.coldmint.top/ftp/muqing/");
} else if (id == R.id.cookie) {
} else if (id == R.id.b) {
context.startActivity(new Intent(context, com.muqingbfq.sz.class));
// 设置中心

View File

@ -1,13 +1,10 @@
package com.muqingbfq;
import android.annotation.SuppressLint;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.IBinder;
import android.view.Menu;
import android.view.MenuItem;
@ -22,31 +19,17 @@ import com.muqingbfq.fragment.bfq_db;
import com.muqingbfq.mq.gj;
public class home extends AppCompatActivity {
private final ServiceConnection serviceConnection=new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
bfqkz.MyBinder binder = (bfqkz.MyBinder) iBinder;
bfqkz service = binder.getService();
// 与Service建立连接后可以通过myService调用Service中的方法
isBound = true;
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
isBound = false;
//断开连接
}
};
private boolean isBound = false;
@SuppressLint("StaticFieldLeak")
public static AppCompatActivity appCompatActivity;
@SuppressLint({"CommitTransaction", "ObsoleteSdkInt"})
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.Theme_muqing);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
appCompatActivity = this;
new start();
Media.view = null;
try {
//初始化工具栏
@ -68,8 +51,7 @@ public class home extends AppCompatActivity {
// 启动Service
if (serviceIntent == null) {
serviceIntent = new Intent(this, bfqkz.class);
// startService(serviceIntent);
bindService(serviceIntent,serviceConnection, Context.BIND_AUTO_CREATE);
startService(serviceIntent);
}
//检测更新
new gj.jianchagengxin(this);
@ -77,6 +59,7 @@ public class home extends AppCompatActivity {
yc.tc(this, e);
}
}
private static Intent serviceIntent;
@Override
protected void onPause() {
@ -97,17 +80,6 @@ public class home extends AppCompatActivity {
.add(R.id.bfq_db, new bfq_db()).commit();
}
@Override
protected void onDestroy() {
super.onDestroy();
//销毁之前 finish();
// 解绑Service
if (isBound) {
unbindService(serviceConnection);
isBound = false;
}
}
private long time;
@Override
public void onBackPressed() {

View File

@ -3,86 +3,96 @@ package com.muqingbfq.login;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;
import com.muqingbfq.R;
import com.muqingbfq.main;
import com.muqingbfq.mq.ActivityToolbar;
import com.muqingbfq.mq.gj;
import com.muqingbfq.mq.wl;
import com.muqingbfq.yc;
import org.json.JSONException;
import org.json.JSONObject;
public class enroll extends AppCompatActivity {
EditText eduser,edpassword;
String user , name , password;
public class enroll extends ActivityToolbar {
EditText edit_account, edit_username,
edit_password, edit_email;
public String account, username, password, email, appID;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_enroll);
setSupportActionBar(findViewById(R.id.toolbar));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Intent intent = getIntent();
//获取UID编辑框
eduser = findViewById(R.id.edit_user);
eduser.setText(
intent.getStringExtra("user"));
edit_account = findViewById(R.id.edit_user);
edit_username = findViewById(R.id.edit_name);
//设置密码编辑框
edpassword = findViewById(R.id.edit_password);
// findViewById(R.id.edit_cookie).setOnClickListener(view -> new user_logs.erweima(view.getContext()));
edit_password = findViewById(R.id.edit_password);
edit_email = findViewById(R.id.edit_email);
edit_username.setText(
intent.getStringExtra("user"));
appID = intent.getStringExtra("appID");
findViewById(R.id.enroll).setOnClickListener(view -> a());
}
public void a() {
user = eduser.getText().toString();
password = edpassword.getText().toString();
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
View v = getWindow().peekDecorView();
if (null != v) {
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}
new thread().start();
new thread();
}
private void end() {
private void end() {
Intent intent = new Intent(); // 创建一个新意图
Bundle bundle = new Bundle(); // 创建一个新包裹
// 往包裹存入名叫response_time的字符串
bundle.putString("user", user);
bundle.putString("user", account);
// 往包裹存入名叫response_content的字符串
bundle.putString("password", password);
intent.putExtras(bundle); // 把快递包裹塞给意图
// 携带意图返回上一个页面RESULT_OK表示处理成功
setResult(Activity.RESULT_OK, intent);
finish(); // 结束当前的活动页面
}
class thread extends Thread {
public thread() {
account = edit_account.getText().toString();
username = edit_username.getText().toString();
password = edit_password.getText().toString();
email = edit_email.getText().toString();
start();
}
@Override
public void run() {
super.run();
String get = "user=" + user
+ "&name=" + name
+ "&password=" + password
+ "&cookie" + wl.Cookie;
String s = wl.get("http://139.196.224.229/muqing/enroll.php?" + get);
try {
JSONObject jsonObject = new JSONObject(s);
int code = jsonObject.getInt("code");
String msg = jsonObject.getString("msg");
main.handler.post(() -> gj.ts(enroll.this, msg));
if (code == 200) {
JSONObject jsonpost = wl.jsonpost("/php/user.php?action=register",
new String[]{
"account", "userName", "passWord"
, "email", "appID"
}
, new String[]{
account, username, password, email, appID
});
if (TextUtils.isEmpty(jsonpost.toString())) {
return;
}
int code = jsonpost.getInt("code");
String message = jsonpost.getString("message");
gj.xcts(enroll.this, message);
if (code == 0) {
end();
}
} catch (Exception e) {
yc.start(e);
} catch (JSONException e) {
gj.sc(e);
}
}
}

View File

@ -87,8 +87,6 @@ public class user_editing extends ActivityToolbar {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_editing);
setSupportActionBar(findViewById(R.id.toolbar));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
imageViewa = findViewById(R.id.image1);
edit_name = findViewById(R.id.edit_name);
edit_qianming = findViewById(R.id.edit_qianming);

View File

@ -1,7 +1,6 @@
package com.muqingbfq.login;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@ -14,6 +13,8 @@ import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
@ -33,6 +34,20 @@ public class user_logs extends AppCompatActivity {
Toolbar toolbar;
public static String UUID;
ActivityResultLauncher<Intent> enroll =
registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == RESULT_OK) {
Intent data = result.getData();
if (data != null) {
Bundle bundle = data.getExtras();
String user = bundle.getString("user");
String password = bundle.getString("password");
edituser.setText(user);
editpassword.setText(password);
}
}
});
@SuppressLint("HardwareIds")
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -50,23 +65,12 @@ public class user_logs extends AppCompatActivity {
editpassword = findViewById(R.id.edit_password);
findViewById(R.id.login).setOnClickListener(view -> new CloudUser(edituser.getText().toString()
, editpassword.getText().toString()));
/* findViewById(R.id.enroll).setOnClickListener(view -> {
findViewById(R.id.enroll).setOnClickListener(view -> {
Intent intent = new Intent(user_logs.this, enroll.class);
intent.putExtra("user", edituser.getText().toString());
startActivityForResult(intent, 0);
});*/
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (data != null && requestCode == 0 && resultCode == Activity.RESULT_OK) {
Bundle bundle = data.getExtras();
String user = bundle.getString("user");
String password = bundle.getString("password");
edituser.setText(user);
editpassword.setText(password);
}
intent.putExtra("appID", UUID);
enroll.launch(intent);
});
}
//some statement
@ -95,8 +99,8 @@ public class user_logs extends AppCompatActivity {
}
public String account, password;
class CloudUser extends Thread {
String account, password;
public CloudUser(String account, String password) {
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
@ -104,8 +108,8 @@ public class user_logs extends AppCompatActivity {
if (null != v) {
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}
this.account = account;
this.password = password;
user_logs.this.account = account;
user_logs.this.password = password;
start();
}
@ -121,76 +125,79 @@ public class user_logs extends AppCompatActivity {
account, password, UUID, ""
});
gj.sc(post);
if (!TextUtils.isEmpty(post)) {
JSONObject jsonObject = new JSONObject(post);
if (jsonObject.getInt("code") == 0) {
JSONObject data = jsonObject.getJSONObject("data");
gj.sc(data);
//用户token
String token = data.getString("token");
//用户名称account
String account = data.getString("account");
main.settoken(token, account);
new user_message(account);
user_logs.this.finish();
} else {
String message = jsonObject.getString("message");
gj.xcts(user_logs.this, message);
if (message.equals("请更改登录设备")) {
JSONObject jsonpost = wl.jsonpost("/php/user.php?action=verification",
new String[]{
"account", "passWord", "appID", "isEmail"
},
new String[]{
account, password, UUID, ""
});
gj.sc(jsonpost);
if (!TextUtils.isEmpty(jsonpost.toString()) &&
jsonpost.getInt("code") != 0) {
return;
}
String message1 = jsonpost.getString("message");
gj.xcts(user_logs.this, message1);
main.handler.post(() -> {
EditViewDialog editViewDialog = new EditViewDialog(user_logs.this,
"请输入验证码");
editViewDialog.setMessage("验证码在你账号锁绑定的邮箱绘制垃圾桶中请及时查看");
editViewDialog.setPositive(view -> {
new Thread() {
@Override
public void run() {
JSONObject jsonpost = wl.jsonpost("/php/user.php?action=changeAppId",
new String[]{
"account", "key", "appID", "isEmail"
},
new String[]{
account, editViewDialog.getEditText(), UUID, "false"
});
gj.sc(jsonpost.toString());
if (!TextUtils.isEmpty(jsonpost.toString())) {
try {
int code = jsonpost.getInt("code");
if (code == 0) {
gj.xcts(user_logs.this,
"验证成功请重新登录");
editViewDialog.dismiss();
} else {
gj.xcts(user_logs.this,
jsonpost.getString("message"));
}
} catch (JSONException e) {
if (TextUtils.isEmpty(post)) {
return;
}
JSONObject jsonObject = new JSONObject(post);
if (jsonObject.getInt("code") == 0) {
JSONObject data = jsonObject.getJSONObject("data");
gj.sc(data);
//用户token
String token = data.getString("token");
//用户名称account
String account = data.getString("account");
main.settoken(token, account);
new user_message(account);
user_logs.this.finish();
} else {
String message = jsonObject.getString("message");
gj.xcts(user_logs.this, message);
if (message.equals("请更改登录设备")) {
JSONObject jsonpost = wl.jsonpost("/php/user.php?action=verification",
new String[]{
"account", "passWord", "appID", "isEmail"
},
new String[]{
account, password, UUID, ""
});
gj.sc(jsonpost);
if (!TextUtils.isEmpty(jsonpost.toString()) &&
jsonpost.getInt("code") != 0) {
return;
}
String message1 = jsonpost.getString("message");
gj.xcts(user_logs.this, message1);
main.handler.post(() -> {
EditViewDialog editViewDialog = new EditViewDialog(user_logs.this,
"请输入验证码");
editViewDialog.setMessage("验证码在你账号锁绑定的邮箱绘制垃圾桶中请及时查看");
editViewDialog.setPositive(view -> {
new Thread() {
@Override
public void run() {
JSONObject jsonpost = wl.jsonpost("/php/user.php?action=changeAppId",
new String[]{
"account", "key", "appID", "isEmail"
},
new String[]{
account, editViewDialog.getEditText(), UUID, "false"
});
gj.sc(jsonpost.toString());
if (!TextUtils.isEmpty(jsonpost.toString())) {
try {
int code = jsonpost.getInt("code");
if (code == 0) {
gj.xcts(user_logs.this,
"验证成功请重新登录");
editViewDialog.dismiss();
gj.sc(e);
} else {
gj.xcts(user_logs.this,
jsonpost.getString("message"));
}
} catch (JSONException e) {
editViewDialog.dismiss();
gj.sc(e);
}
}
}.start();
}
}.start();
// editViewDialog.dismiss();
});
editViewDialog.setEditinputType("number");
editViewDialog.show();
});
}
editViewDialog.setEditinputType("number");
editViewDialog.show();
});
} else if (message.equals("请先激活您的账户")) {
jihuo();
}
}
} catch (Exception e) {
@ -199,4 +206,48 @@ public class user_logs extends AppCompatActivity {
}
}
public void jihuo() {
main.handler.post(new Runnable() {
@Override
public void run() {
EditViewDialog editViewDialog = new EditViewDialog(user_logs.this, "激活用户")
.setMessage("验证码在你账号锁绑定的邮箱绘制垃圾桶中请及时查看");
editViewDialog.setPositive(new View.OnClickListener() {
@Override
public void onClick(View view) {
String editText = editViewDialog.getEditText();
new Thread() {
@Override
public void run() {
super.run();
JSONObject post = wl.jsonpost("/php/user.php?action=enableAccount",
new String[]{
"account", "key"
}
, new String[]{
account, editText
});
if (TextUtils.isEmpty(post.toString())) {
return;
}
try {
int code = post.getInt("code");
gj.xcts(user_logs.this, post.getString("message"));
if (code == 1) {
return;
}
editViewDialog.dismiss();
} catch (JSONException e) {
gj.sc(e);
}
}
}.start();
}
}).setEditinputType("number")
.show();
}
});
}
}

View File

@ -12,20 +12,9 @@ import org.json.JSONException;
import org.json.JSONObject;
public class visitor extends Thread {
AppCompatActivity activity;
Intent intent;
public visitor(AppCompatActivity activity, Intent intent) {
this.activity = activity;
this.intent = intent;
start();
}
public visitor() {
start();
}
@Override
public void run() {
super.run();
@ -36,7 +25,5 @@ public class visitor extends Thread {
} catch (Exception e) {
com.muqingbfq.mq.gj.sc(e);
}
activity.startActivity(intent);
activity.finish();
}
}

View File

@ -6,11 +6,14 @@ import android.content.SharedPreferences;
import android.os.Handler;
import android.os.Looper;
import androidx.appcompat.app.AppCompatDelegate;
import com.muqingbfq.login.visitor;
import com.muqingbfq.mq.wj;
import com.muqingbfq.mq.wl;
public class main extends Application {
private static Application application;
public static Application application;
public static Handler handler = new Handler(Looper.getMainLooper());
public static String api = "http://139.196.224.229:3000";
@ -57,6 +60,20 @@ public class main extends Application {
if (bj) {
edit.commit();
}
wl.Cookie = main.sp.getString(main.Cookie, "");
if (wl.Cookie.equals("")) {
new visitor();
}
SharedPreferences theme = getSharedPreferences("theme", MODE_PRIVATE);
@SuppressLint("CommitPrefEdits") SharedPreferences.Editor edit = theme.edit();
int i = theme.getInt("theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
if (i == AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) {
edit.putInt("theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
edit.apply();
}
AppCompatDelegate.setDefaultNightMode(i);
}
public static SharedPreferences getSharedPreferences(String string) {

View File

@ -1,10 +1,15 @@
package com.muqingbfq.mq;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.muqingbfq.R;
public class ActivityToolbar extends AppCompatActivity {
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
@ -13,4 +18,14 @@ public class ActivityToolbar extends AppCompatActivity {
}
return super.onOptionsItemSelected(item);
}
public void setToolbar() {
setSupportActionBar(findViewById(R.id.toolbar));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
public void setContentView(int view) {
super.setContentView(view);
setToolbar();
}
}

View File

@ -32,12 +32,14 @@ public class EditViewDialog {
buttona.setOnClickListener(view -> dismiss());
buttonb.setOnClickListener(view -> dismiss());
}
public void setTitle(String str) {
public EditViewDialog setTitle(String str) {
AlertDialogBuilder.setTitle(str);
return this;
}
public void setMessage(String str) {
public EditViewDialog setMessage(String str) {
AlertDialogBuilder.setMessage(str);
return this;
}
public AlertDialog show() {
@ -51,7 +53,7 @@ public class EditViewDialog {
return editText.getText().toString();
}
public void setEditinputType(String str) {
public EditViewDialog setEditinputType(String str) {
int inputType;
switch (str) {
case "textCapCharacters":
@ -142,6 +144,7 @@ public class EditViewDialog {
break;
}
editText.setInputType(inputType);
return this;
}
public void dismiss() {
@ -152,8 +155,13 @@ public class EditViewDialog {
buttona.setOnClickListener(a);
}
public void setPositive(View.OnClickListener a) {
public EditViewDialog setPositive(View.OnClickListener a) {
buttonb.setOnClickListener(a);
return this;
}
public interface OnClickListener extends View.OnClickListener {
@Override
void onClick(View view);
}
}

View File

@ -119,17 +119,16 @@ public class NotificationManagerCompat {
}
@SuppressLint({"MissingPermission", "RestrictedApi", "NotifyDataSetChanged"})
public void setBitmap(Bitmap bitmap) {
bfq.bitmap = bitmap;
if (bitmap == null) {
bitmap = BitmapFactory.decodeResource(context.getResources(),
public void setBitmap() {
if (bfq.bitmap == null) {
bfq.bitmap = BitmapFactory.decodeResource(context.getResources(),
R.drawable.icon);
}
if (notificationManager != null) {
notificationBuilder.setLargeIcon(bitmap);
notificationBuilder.setLargeIcon(bfq.bitmap);
notificationManager.notify(1, notificationBuilder.build());
}
Media.setImageBitmap(bitmap);
Media.setImageBitmap();
}
private NotificationCompat.Builder getNotificationBuilder(Context context) {

View File

@ -24,6 +24,7 @@ public class gj {
public static void xcts(Context context, Object b) {
main.handler.post(() -> Toast.makeText(context, b.toString(), Toast.LENGTH_SHORT).show());
}
public static void sc(Object a) {

View File

@ -1,51 +1,24 @@
package com.muqingbfq;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.util.DisplayMetrics;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import com.muqingbfq.login.visitor;
import com.muqingbfq.mq.wj;
import com.muqingbfq.mq.wl;
public class start extends AppCompatActivity {
Intent home;
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
home = new Intent(this, home.class);
DisplayMetrics dm = getResources().getDisplayMetrics();
public class start {
public start() {
DisplayMetrics dm = home.appCompatActivity.getResources().getDisplayMetrics();
main.k = dm.widthPixels;
main.g = dm.heightPixels;
startApp();
}
private void startApp() {
SharedPreferences theme = getSharedPreferences("theme", MODE_PRIVATE);
@SuppressLint("CommitPrefEdits") SharedPreferences.Editor edit = theme.edit();
int i = theme.getInt("theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
if (i == AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) {
edit.putInt("theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
edit.apply();
}
AppCompatDelegate.setDefaultNightMode(i);
wl.Cookie = main.sp.getString(main.Cookie, "");
if (wj.filesdri == null) {
new wj(this);
}
if (wl.Cookie.equals("")) {
new visitor(this, home);
} else {
startActivity(home);
finish();
new wj(home.appCompatActivity);
}
}
}

View File

@ -8,69 +8,34 @@
android:fillViewport="true"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/name"
android:textColor="@color/text"
android:textSize="26sp" />
<TextView
android:id="@+id/zz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:text="@string/zz"
android:textSize="20sp" />
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/kp1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
tools:ignore="NestedWeights">
<com.google.android.material.card.MaterialCardView
android:id="@+id/view1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/kp1"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="16dp"
app:cardUseCompatPadding="true">
<ImageView
android:id="@+id/mttx"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="no"
android:scaleType="fitXY"
android:src="@drawable/icon" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
<com.dirror.lyricviewx.LyricViewX
<me.wcy.lrcview.LrcView
android:id="@+id/gc"
android:layout_width="0dp"
android:layout_height="match_parent"
@ -83,7 +48,6 @@
app:lrcTimelineTextColor="@color/text_tm"
tools:ignore="MissingConstraints" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -113,7 +77,6 @@
android:layout_height="wrap_content"
android:text="@string/_00_00" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -38,7 +38,18 @@
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hell"
android:text="软件名称:云音乐\n开发者MUQING\n平台Android/HarmonyOS\n软件介绍\n
云音乐是一款对接了网易云SDK的音乐媒体娱乐软件。它提供了丰富的音乐资源和功能让用户可以随时随地畅享高品质的音乐体验。\n
主要特点:\n
丰富的音乐库云音乐对接了网易云SDK涵盖了各种流派和风格的歌曲让用户可以根据自己的喜好随心选择音乐库。\n
用户个性化推荐:基于智能算法,云音乐为用户提供个性化的音乐推荐,根据用户的听歌历史、偏好和趋向,推荐适合用户口味的音乐。\n
歌曲搜索和在线播放:用户可以通过关键词搜索自己喜欢的歌曲,也可以在线播放音乐,无需下载。\n
歌曲收藏和创建歌单:用户可以将喜欢的歌曲收藏起来,创建自己的歌单,方便随时收听。\n
超清音质:云音乐支持高品质的音乐播放,让用户感受更加真实、清晰的音乐体验。\n
歌词显示和歌曲分享:云音乐还提供歌词显示功能,让用户可以跟随歌词唱歌。同时,用户也可以将自己喜欢的歌曲分享给朋友。\n
无论你是需要放松身心、工作休闲,或者在旅途中享受音乐,云音乐都能满足你的需求。欢迎下载使用云音乐,让音乐成为你生活的一部分。\n
\n
请注意,以上只是一个软件介绍的示例,软件具体开发工程还没有完善,具体的介绍内容可以根据实际情况进行体验软件。\n"
android:textSize="16sp"
android:padding="16dp"/>
</LinearLayout>

View File

@ -8,7 +8,30 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/name"
android:textColor="@color/text"
android:textSize="26sp" />
<TextView
android:id="@+id/zz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:text="@string/zz"
android:textSize="20sp" />
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_bfq"
android:layout_width="match_parent"

View File

@ -1,54 +1,94 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="注册" />
app:title="注册账号" />
<LinearLayout
android:id="@+id/user1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:hint="UID">
android:layout_marginTop="20dp">
<EditText
android:id="@+id/edit_user"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress" />
android:autofillHints="text|textNoSuggestions"
android:hint="@string/user"
android:inputType="number"
android:digits="0123456789qwertyuiopasdfghjklzxcvbnm"
tools:ignore="TextContrastCheck,VisualLintTextFieldSize" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp">
<EditText
android:id="@+id/edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="name"
android:hint="@string/name"
android:inputType="textPersonName"
tools:ignore="TextContrastCheck,VisualLintTextFieldSize" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
app:passwordToggleEnabled="true"
android:hint="密码">
app:passwordToggleEnabled="true">
<EditText
android:id="@+id/edit_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
android:autofillHints="password"
android:hint="@string/password"
android:inputType="textPassword"
tools:ignore="TextContrastCheck,VisualLintTextFieldSize" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/enroll"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="16dp"
android:text="注册"
android:textColor="@color/bj" />
android:layout_marginTop="20dp">
<EditText
android:id="@+id/edit_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="emailAddress"
android:hint="邮箱"
android:inputType="textEmailAddress"
tools:ignore="TextContrastCheck,VisualLintTextFieldSize" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<Button
android:id="@+id/enroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enroll"
android:layout_marginStart="26dp"
android:layout_marginEnd="26dp"
tools:ignore="VisualLintButtonSize" />
</LinearLayout>

View File

@ -2,14 +2,16 @@
<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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="用户编辑"/>
app:title="用户编辑" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
@ -17,25 +19,30 @@
android:paddingStart="16dp"
android:paddingTop="6dp"
android:paddingEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_marginBottom="16dp"
tools:ignore="UseCompoundDrawables,UselessParent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="头像:" />
<com.google.android.material.card.MaterialCardView
android:layout_width="68dp"
android:layout_height="68dp">
<ImageView
android:id="@+id/image1"
android:layout_width="match_parent"
@ -43,6 +50,7 @@
android:src="@drawable/icon" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -59,6 +67,7 @@
android:singleLine="true"
tools:ignore="VisualLintTextFieldSize,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -75,11 +84,13 @@
android:singleLine="true"
tools:ignore="VisualLintTextFieldSize,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/menu"
style="@style/Widget.Material3.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/autoComplete"
android:layout_width="match_parent"
@ -89,25 +100,29 @@
app:simpleItems="@array/xingbie"
tools:ignore="SpeakableTextPresentCheck,VisualLintTextFieldSize" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
tools:ignore="UseCompoundDrawables,UselessParent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="背景(此软件暂无使用背景):" />
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_height="wrap_content"
app:cardUseCompatPadding="true">
<ImageView
android:id="@+id/image2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/icon" />
</com.google.android.material.card.MaterialCardView>
@ -131,5 +146,5 @@
android:layout_margin="16dp"
android:contentDescription="保存"
android:text="保存"
app:icon="@drawable/icon"/>
app:icon="@drawable/icon" />
</LinearLayout>

View File

@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
@ -15,7 +14,7 @@
<LinearLayout
android:id="@+id/user1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
@ -31,10 +30,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="16dp"
android:hint="铁锈助手账号">
android:layout_marginEnd="16dp">
<EditText
android:id="@+id/edit_user"
android:hint="铁锈助手账号"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
@ -47,7 +46,6 @@
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:hint="密码"
app:passwordToggleEnabled="true">
<EditText
@ -55,6 +53,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:hint="密码"
android:inputType="textPassword"
android:textColorHint="#546E7A"
tools:ignore="LabelFor,TextContrastCheck,VisualLintTextFieldSize" />
@ -77,29 +76,28 @@
tools:ignore="TextContrastCheck,VisualLintTextFieldSize" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/login"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_weight="1"
android:text="@string/login"
tools:ignore="ButtonStyle,DuplicateSpeakableTextCheck" />
<Button
android:id="@+id/enroll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="注册(维护中)"
tools:ignore="ButtonStyle" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/login"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_weight="1"
android:text="@string/login"
tools:ignore="ButtonStyle,DuplicateSpeakableTextCheck" />
<Button
android:id="@+id/enroll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/enroll"
tools:ignore="ButtonStyle" />
</LinearLayout>
</LinearLayout>

View File

@ -5,65 +5,38 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/kp1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
tools:ignore="NestedWeights">
android:gravity="center">
<com.google.android.material.card.MaterialCardView
android:id="@+id/view1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="16dp"
android:layout_centerHorizontal="true"
app:cardUseCompatPadding="true">
android:layout_width="260dp"
android:layout_height="260dp"
app:cardCornerRadius="16dp">
<ImageView
android:id="@+id/mttx"
android:layout_width="260dp"
android:layout_height="260dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="no"
android:scaleType="fitXY"
android:src="@drawable/icon" />
</com.google.android.material.card.MaterialCardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/view1"
android:layout_alignStart="@id/view1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/name"
android:textColor="@color/text"
android:textSize="26sp" />
<TextView
android:id="@+id/zz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:text="@string/zz"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>
<com.dirror.lyricviewx.LyricViewX
<me.wcy.lrcview.LrcView
android:id="@+id/gc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:layout_weight="2"
app:lrcCurrentTextColor="@color/text"
app:lrcLabel="@string/app_name"
app:lrcNormalTextSize="16sp"
@ -72,6 +45,7 @@
app:lrcTimelineTextColor="@color/text_tm"
tools:ignore="MissingConstraints" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -88,6 +62,7 @@
app:tint="@color/text"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -117,6 +92,7 @@
android:layout_height="wrap_content"
android:text="@string/_00_00" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -11,5 +11,6 @@
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="@color/text"
app:strokeColor="@color/text"
app:strokeWidth="1dp" />
</LinearLayout>

View File

@ -4,10 +4,6 @@
android:id="@+id/a"
android:icon="@drawable/fuwuzhongxing"
android:title="@string/fuwuzhongxing" />
<item
android:id="@+id/cookie"
android:icon="@drawable/icon"
android:title="绑定Cookie" />
<item
android:id="@+id/b"
android:icon="@drawable/set_up"

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.云音乐" parent="Theme.start">
<style name="Theme.muqing" parent="Theme.start">
<!-- <item name="colorPrimary">@color/purple_200</item>-->
<!-- <item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/text</item>
@ -8,12 +8,4 @@
<item name="colorOnSecondary">@color/text</item>-->
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.ui" parent="Theme.云音乐">
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<!-- 设置全屏为false-->
<item name="android:statusBarColor">@color/tm</item>
<item name="android:navigationBarColor">@color/tm</item>
</style>
</resources>

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="LyricView">
<attr name="lrcTextSize" format="dimension" />
<attr name="lrcNormalTextSize" format="dimension" />
<attr name="lrcSentenceDividerHeight" format="dimension" />
<attr name="lrcTranslateDividerHeight" format="dimension" />
<attr name="lrcNormalTextColor" format="reference|color" />
<attr name="lrcCurrentTextColor" format="reference|color" />
<attr name="lrcTimelineTextColor" format="reference|color" />
<attr name="lrcAnimationDuration" format="integer" />
<attr name="lrcLabel" format="string" />
<attr name="lrcPadding" format="dimension" />
<attr name="lrcTimelineColor" format="reference|color" />
<attr name="lrcTimelineHeight" format="dimension" />
<attr name="lrcPlayDrawable" format="reference" />
<attr name="lrcTimeTextColor" format="reference|color" />
<attr name="lrcTimeTextSize" format="dimension" />
<attr name="lrcTextGravity">
<enum name="center" value="0" />
<enum name="left" value="1" />
<enum name="right" value="2" />
</attr>
<attr name="lrcTranslateTextScaleValue" format="float" />
<attr name="lrcHorizontalOffset" format="dimension" />
<attr name="lrcHorizontalOffsetPercent" format="float" />
<attr name="lrcItemOffsetPercent" format="float" />
<attr name="lrcIsDrawTranslation" format="boolean" />
</declare-styleable>
</resources>

View File

@ -1,22 +1,14 @@
<resources>
<string name="app_name">云音乐</string>
<string name="sz">设置</string>
<string name="hell">软件名称:云音乐\n开发者MUQING\n平台Android/HarmonyOS\n软件介绍\n
云音乐是一款对接了网易云SDK的音乐媒体娱乐软件。它提供了丰富的音乐资源和功能让用户可以随时随地畅享高品质的音乐体验。\n
主要特点:\n
丰富的音乐库云音乐对接了网易云SDK涵盖了各种流派和风格的歌曲让用户可以根据自己的喜好随心选择音乐库。\n
用户个性化推荐:基于智能算法,云音乐为用户提供个性化的音乐推荐,根据用户的听歌历史、偏好和趋向,推荐适合用户口味的音乐。\n
歌曲搜索和在线播放:用户可以通过关键词搜索自己喜欢的歌曲,也可以在线播放音乐,无需下载。\n
歌曲收藏和创建歌单:用户可以将喜欢的歌曲收藏起来,创建自己的歌单,方便随时收听。\n
超清音质:云音乐支持高品质的音乐播放,让用户感受更加真实、清晰的音乐体验。\n
歌词显示和歌曲分享:云音乐还提供歌词显示功能,让用户可以跟随歌词唱歌。同时,用户也可以将自己喜欢的歌曲分享给朋友。\n
无论你是需要放松身心、工作休闲,或者在旅途中享受音乐,云音乐都能满足你的需求。欢迎下载使用云音乐,让音乐成为你生活的一部分。\n
\n
请注意,以上只是一个软件介绍的示例,软件具体开发工程还没有完善,具体的介绍内容可以根据实际情况进行体验软件。\n</string>
<string name="zz">作者</string>
<string name="name">名称</string>
<string name="bflb">播放列表</string>
<string name="login">登录</string>
<string name="user">账号</string>
<string name="enroll">注册</string>
<string name="password">密码</string>
<string name="channel_id">channel_id</string>
<string name="fx">分享</string>
<string name="hdct">滑动窗体</string>

View File

@ -1,6 +1,6 @@
<resources>
<!-- Base application theme. -->
<style name="Theme.云音乐" parent="Theme.start">
<style name="Theme.muqing" parent="Theme.start">
<!-- <item name="colorOnPrimary">@color/text</item>-->
<!-- <item name="colorOnSecondary">@color/text</item>-->
<item name="android:windowLightStatusBar">true</item>
@ -16,7 +16,7 @@
</style>
<style name="fragment_dialog" parent="Theme.云音乐">
<style name="fragment_dialog" parent="Theme.muqing">
<item name="android:windowIsTranslucent">true</item>
</style>

View File

@ -18,4 +18,4 @@ android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.suppressUnsupportedCompileSdk=34