@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -0,0 +1 @@
|
||||
App1
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="MainActivity3">
|
||||
<State />
|
||||
</entry>
|
||||
<entry key="app">
|
||||
<State />
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,17 @@
|
||||
<?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">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
<component name="VisualizationToolProject">
|
||||
<option name="state">
|
||||
<ProjectState>
|
||||
<option name="scale" value="0.6180048661800487" />
|
||||
</ProjectState>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1 @@
|
||||
/build
|
@ -0,0 +1,40 @@
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.example.app1'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.app1"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,26 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.example.app1", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Base.Theme.App1"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".MainActivity3"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".personFragment"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity2"
|
||||
android:exported="false" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.actions"
|
||||
android:resource="@xml/user_login" />
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".IndexActivity"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,70 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DBHelper extends SQLiteOpenHelper {
|
||||
|
||||
// 数据库名称和版本号
|
||||
private static final String DATABASE_NAME = "user_db";
|
||||
private static final int DATABASE_VERSION = 1;
|
||||
|
||||
// 表名和列名
|
||||
private static final String TABLE_USERS = "users";
|
||||
private static final String COLUMN_ID = "id";
|
||||
private static final String COLUMN_USERNAME = "username";
|
||||
private static final String COLUMN_PASSWORD = "password";
|
||||
|
||||
// 创建用户表的SQL语句
|
||||
private static final String SQL_CREATE_TABLE_USERS =
|
||||
"CREATE TABLE " + TABLE_USERS + " (" +
|
||||
COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
|
||||
COLUMN_USERNAME + " TEXT," +
|
||||
COLUMN_PASSWORD + " TEXT)";
|
||||
|
||||
// 构造方法
|
||||
public DBHelper(Context context) {
|
||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
// 创建用户表
|
||||
db.execSQL(SQL_CREATE_TABLE_USERS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
// 数据库升级时执行的操作(暂不处理)
|
||||
}
|
||||
|
||||
public List<User> getAllUsers() {
|
||||
List<User> userList = new ArrayList<>();
|
||||
String selectQuery = "SELECT * FROM " + TABLE_USERS;
|
||||
|
||||
SQLiteDatabase db = this.getWritableDatabase();
|
||||
Cursor cursor = db.rawQuery(selectQuery, null);
|
||||
|
||||
// 遍历游标,并将数据添加到用户列表中
|
||||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
User user = new User();
|
||||
user.setId(cursor.getInt(cursor.getColumnIndex(COLUMN_ID)));
|
||||
user.setUsername(cursor.getString(cursor.getColumnIndex(COLUMN_USERNAME)));
|
||||
user.setPassword(cursor.getString(cursor.getColumnIndex(COLUMN_PASSWORD)));
|
||||
userList.add(user);
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
|
||||
// 关闭游标和数据库连接
|
||||
cursor.close();
|
||||
db.close();
|
||||
|
||||
return userList;
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
|
||||
public class IndexActivity extends AppCompatActivity implements View.OnClickListener{
|
||||
private LinearLayout musicLine,findLine,liveLine,personLine;
|
||||
private TextView lastSelectedText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.index_daohan);
|
||||
init();
|
||||
switchFragment(new musicFragment());
|
||||
setDefaultTextColor(findViewById(R.id.wenzi1)); // 设置默认选中项的文字颜色
|
||||
lastSelectedText = findViewById(R.id.wenzi1);
|
||||
}
|
||||
private void init(){
|
||||
musicLine = findViewById(R.id.gaohan1);
|
||||
musicLine.setOnClickListener(this);
|
||||
findLine = findViewById(R.id.gaohan2);
|
||||
findLine.setOnClickListener(this);
|
||||
liveLine = findViewById(R.id.gaohan3);
|
||||
liveLine.setOnClickListener(this);
|
||||
personLine = findViewById(R.id.gaohan4);
|
||||
personLine.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void setDefaultTextColor(TextView text) {
|
||||
text.setTextColor(Color.parseColor("#FF4081")); // 设置默认选中项的文字颜色
|
||||
}
|
||||
private void resetTextColor(TextView text) {
|
||||
text.setTextColor(Color.parseColor("#000000")); // 设置默认项的文字颜色为默认颜色
|
||||
}
|
||||
@Override
|
||||
public void onClick(View view){
|
||||
resetTextColor(lastSelectedText); // 恢复上一个选中项的文字颜色为默认颜色
|
||||
if (view.getId() == R.id.gaohan1) {
|
||||
switchFragment(new musicFragment());
|
||||
lastSelectedText = findViewById(R.id.wenzi1);
|
||||
setDefaultTextColor(lastSelectedText);
|
||||
} else if (view.getId() == R.id.gaohan2) {
|
||||
switchFragment(new findFragment());
|
||||
lastSelectedText = findViewById(R.id.wenzi2);
|
||||
setDefaultTextColor(lastSelectedText);
|
||||
} else if (view.getId() == R.id.gaohan3) {
|
||||
switchFragment(new liveFragment());
|
||||
lastSelectedText = findViewById(R.id.wenzi3);
|
||||
setDefaultTextColor(lastSelectedText);
|
||||
} else if (view.getId() == R.id.gaohan4) {
|
||||
switchFragment(new personFragment());
|
||||
lastSelectedText = findViewById(R.id.wenzi4);
|
||||
setDefaultTextColor(lastSelectedText);
|
||||
}
|
||||
}
|
||||
private void switchFragment(Fragment fragment) {
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.gaohan, fragment).commit();
|
||||
}
|
||||
|
||||
public void tuichudenglu(View view){
|
||||
Intent intent2 = new Intent(IndexActivity.this, MainActivity.class);
|
||||
startActivity(intent2);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class MainActivity2 extends AppCompatActivity {
|
||||
|
||||
private EditText username;
|
||||
private EditText password;
|
||||
private Button login;
|
||||
private DBHelper dbHelper; // 数据库助手类
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.user_login);
|
||||
|
||||
username = findViewById(R.id.username);
|
||||
password = findViewById(R.id.password);
|
||||
login = findViewById(R.id.login);
|
||||
|
||||
dbHelper = new DBHelper(MainActivity2.this); // 初始化数据库助手类
|
||||
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String strUsername = username.getText().toString().trim();
|
||||
String strPassword = password.getText().toString().trim();
|
||||
|
||||
// 获取所有用户数据
|
||||
List<User> userList = dbHelper.getAllUsers();
|
||||
|
||||
// 检查是否有用户数据
|
||||
if (!userList.isEmpty()) {
|
||||
// 遍历用户数据列表
|
||||
for (User user : userList) {
|
||||
String savedUsername = user.getUsername();
|
||||
String savedPassword = user.getPassword();
|
||||
|
||||
// 检查用户名和密码是否匹配
|
||||
if (strUsername.equals(savedUsername) && strPassword.equals(savedPassword)) {
|
||||
Toast.makeText(MainActivity2.this, "恭喜,登录成功!", Toast.LENGTH_SHORT).show();
|
||||
Intent intent1 = new Intent(MainActivity2.this, IndexActivity.class);
|
||||
startActivity(intent1);
|
||||
return; // 如果匹配成功,则直接返回,不再继续循环
|
||||
}
|
||||
}
|
||||
// 如果循环结束仍未匹配成功,则提示用户名或密码错误
|
||||
Toast.makeText(MainActivity2.this, "用户名或密码错误!", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
// 如果用户数据列表为空,则提示用户名或密码错误
|
||||
Toast.makeText(MainActivity2.this, "用户名或密码错误!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//点击注册按钮时,跳转到注册界面
|
||||
public void zhuce(View view) {
|
||||
Intent intent2 = new Intent(MainActivity2.this, MainActivity3.class);
|
||||
startActivity(intent2);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,109 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Intent;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MainActivity3 extends AppCompatActivity implements View.OnClickListener {
|
||||
private TextView reg_username;
|
||||
private TextView reg_password;
|
||||
private TextView reg_sure_password;
|
||||
private RadioGroup radiogroup;
|
||||
private CheckBox ah1, ah2, ah3, ah4;
|
||||
private String sex = "男";
|
||||
private String aihao1 = "", aihao2 = "", aihao3 = "", aihao4 = "";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.user_register);
|
||||
reg_username = findViewById(R.id.reg_username);
|
||||
reg_password = findViewById(R.id.reg_password);
|
||||
reg_sure_password = findViewById(R.id.reg_sure_password);
|
||||
|
||||
findViewById(R.id.reg_register).setOnClickListener(this);
|
||||
radiogroup = findViewById(R.id.rp);
|
||||
radiogroup.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
if (checkedId == R.id.man) {
|
||||
sex = "男";
|
||||
} else if (checkedId == R.id.woman) {
|
||||
sex = "女";
|
||||
}
|
||||
});
|
||||
|
||||
ah1 = findViewById(R.id.chang);
|
||||
ah2 = findViewById(R.id.tiao);
|
||||
ah3 = findViewById(R.id.rap);
|
||||
ah4 = findViewById(R.id.basketball);
|
||||
ah1.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
aihao1 = isChecked ? "唱" : "";
|
||||
});
|
||||
ah2.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
aihao2 = isChecked ? "跳" : "";
|
||||
});
|
||||
ah3.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
aihao3 = isChecked ? "rap" : "";
|
||||
});
|
||||
ah4.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
aihao4 = isChecked ? "篮球" : "";
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String username = reg_username.getText().toString().trim();
|
||||
String password = reg_password.getText().toString().trim();
|
||||
String surepassword = reg_sure_password.getText().toString().trim();
|
||||
|
||||
if (username.isEmpty() || password.isEmpty() || surepassword.isEmpty()) {
|
||||
Toast.makeText(MainActivity3.this, "用户名或密码不能为空!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!password.equals(surepassword)) {
|
||||
Toast.makeText(MainActivity3.this, "两次输入密码不一致!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
// 保存用户名和密码到数据库
|
||||
DBHelper dbHelper = new DBHelper(MainActivity3.this);
|
||||
SQLiteDatabase db = null;
|
||||
try {
|
||||
db = dbHelper.getWritableDatabase();
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("username", username);
|
||||
values.put("password", password);
|
||||
long result = db.insert("users", null, values);
|
||||
if (result == -1) {
|
||||
Toast.makeText(MainActivity3.this, "注册失败!", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(MainActivity3.this, "注册成功!", Toast.LENGTH_SHORT).show();
|
||||
// 如果一切正常,跳转到下一个页面
|
||||
Intent intent1 = new Intent(this, MainActivity2.class);
|
||||
startActivity(intent1);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(MainActivity3.this, "注册失败!", Toast.LENGTH_SHORT).show();
|
||||
} finally {
|
||||
if (db != null) {
|
||||
db.close(); // 关闭数据库连接
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void fanhui(View view) {
|
||||
// 在这里你可以添加检查未保存信息的逻辑
|
||||
Intent intent5 = new Intent(MainActivity3.this, MainActivity2.class);
|
||||
startActivity(intent5);
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.example.app1;
|
||||
|
||||
public class User {
|
||||
private int id;
|
||||
private String username;
|
||||
private String password;
|
||||
public User() {
|
||||
// 默认构造函数
|
||||
}
|
||||
|
||||
public User(int id, String username, String password) {
|
||||
this.id = id;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
// Getter 和 Setter 方法
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
public class findFragment extends Fragment {
|
||||
private ListView listView;
|
||||
private TextView contentText;
|
||||
private ListView playlistView;
|
||||
private int lastClickedPosition = -1; // 记录上次点击的位置
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||
View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_find, container, false);
|
||||
init(view);
|
||||
|
||||
// 默认显示热搜榜内容
|
||||
String[] defaultPlaylist = getPlaylistForItem(0);
|
||||
ArrayAdapter<String> defaultPlaylistAdapter = new ArrayAdapter<>(requireContext(),
|
||||
android.R.layout.simple_list_item_1, defaultPlaylist);
|
||||
playlistView.setAdapter(defaultPlaylistAdapter);
|
||||
return view;
|
||||
}
|
||||
|
||||
private void init(View view) {
|
||||
// 初始化列表和内容显示区域
|
||||
listView = view.findViewById(R.id.list_view);
|
||||
contentText = view.findViewById(R.id.content_text);
|
||||
playlistView = view.findViewById(R.id.playlist_view);
|
||||
|
||||
// 列表项
|
||||
final String[] listItems = {"热搜榜", "儿童热门榜", "影视热搜", "国风热搜", "外语热搜", "情歌热搜", "纯音乐热搜", "综艺热搜"};
|
||||
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(requireContext(),
|
||||
android.R.layout.simple_list_item_1, listItems);
|
||||
listView.setAdapter(adapter);
|
||||
|
||||
|
||||
// 记录上次点击的位置
|
||||
lastClickedPosition = 0;
|
||||
|
||||
// 点击列表项更新内容显示区域的内容和右侧的歌单内容
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
// 恢复上一个点击项的背景颜色
|
||||
if (lastClickedPosition != -1) {
|
||||
View lastClickedView = parent.getChildAt(lastClickedPosition);
|
||||
lastClickedView.setBackgroundColor(Color.TRANSPARENT); // 恢复默认背景色
|
||||
}
|
||||
|
||||
// 获取点击的视图
|
||||
View clickedView = parent.getChildAt(position);
|
||||
// 修改背景颜色为粉色
|
||||
clickedView.setBackgroundColor(Color.parseColor("#FBBCDC")); // 粉色
|
||||
// 更新上次点击的位置
|
||||
lastClickedPosition = position;
|
||||
|
||||
// 更新右侧歌单内容
|
||||
String[] playlist = getPlaylistForItem(position);
|
||||
ArrayAdapter<String> playlistAdapter = new ArrayAdapter<>(requireContext(),
|
||||
android.R.layout.simple_list_item_1, playlist);
|
||||
playlistView.setAdapter(playlistAdapter);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private String[] getPlaylistForItem(int position) {
|
||||
// 根据位置返回相应的歌单内容
|
||||
switch (position) {
|
||||
case 0:
|
||||
return new String[]{"无名的人", "落", "如果可以","若月亮没有来","梨花香","下辈子早点相遇","如果爱忘了","离别开出花","dadada","别爱太满别睡太晚","我把故事酿成酒","梦驼铃","安河桥","你"};
|
||||
case 1:
|
||||
return new String[]{"贝乐虎儿歌", "宝宝巴士", "睡前故事晚安宝贝","寓言故事","黑猫警长救援队","兔小贝睡前故事","宝宝巴士儿歌","迷你特工队","咕力律动儿歌","冰雪奇缘","海绵宝宝","海底小纵队儿歌","一千零一夜睡前故事","熊出没"};
|
||||
case 2:
|
||||
return new String[]{"与凤行", "花间令", "热辣滚烫","繁花","烈焰","追风者","别对我动心","谢谢你温暖我","南来北往","在暴雪时分","小日子","大理寺少卿游","祈今朝","周处除三害"};
|
||||
case 3:
|
||||
return new String[]{"霜雪千年", "青花瓷", "红昭愿","上春山","卜卦","天下","桃花诺","画心","红尘客栈","年轮","牵丝戏","若梦","赤伶","武家坡"};
|
||||
case 4:
|
||||
return new String[]{"fate", "magnetic", "call of silence","see you again","back seat","swag","love story","repeat","hey oh","sheesh","wake","any song","heaven","doar cu tine"};
|
||||
case 5:
|
||||
return new String[]{"紫荆花盛开", "不如见一面", "悬溺","你冷落我我就放弃你","谁","犯错","你把爱情给了谁","负我不负她","霜雪千年","沉溺","打歌妹","浴室","爱情转移","把回忆拼好给你"};
|
||||
case 6:
|
||||
return new String[]{"daydream", "碧苍战歌", "瞬间的永恒","daylight","windy hill","夜空的寂静","神明无止","误入迷失森林","秋的思念","诀别书","水墨兰亭","城南花已开","summer","引忘川"};
|
||||
case 7:
|
||||
return new String[]{"就是爱你", "谈恋爱", "慢冷","流沙","暖暖","小宇","桃花运","挚友","问","一眼","怎样","想你时风起","我的美丽","分飞"};
|
||||
default:
|
||||
return new String[]{};
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class liveFragment extends Fragment {
|
||||
private RecyclerView horizontalRecyclerView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_live, container, false);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
public class musicFragment extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||
View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_music,container,false);
|
||||
init(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
private void init(View view) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
package com.example.app1;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleAdapter;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
public class personFragment extends Fragment {
|
||||
private ListView listNew;
|
||||
|
||||
private List<Map<String,Object>> lists;
|
||||
private SimpleAdapter adapter;
|
||||
private int[][] iv={{R.drawable.gequ1,R.drawable.gequ2,R.drawable.gequ3,R.drawable.gequ4,R.drawable.gequ5},
|
||||
{R.drawable.gequ1,R.drawable.gequ2,R.drawable.gequ3,R.drawable.gequ4,R.drawable.gequ5},
|
||||
{R.drawable.gequ1,R.drawable.gequ2,R.drawable.gequ3,R.drawable.gequ4,R.drawable.gequ5},
|
||||
{R.drawable.gequ1,R.drawable.gequ2,R.drawable.gequ3,R.drawable.gequ4,R.drawable.gequ5}};
|
||||
private String[][] zuopin={{"作品1","作品2","作品3","作品4","作品5"},
|
||||
{"作品11","作品12","作品13","作品14","作品15"},
|
||||
{"作品21","作品22","作品23","作品24","作品25"},
|
||||
{"作品31","作品32","作品33","作品34","作品35"}};
|
||||
private String[][]zuozhe={{"作者1","作者2","作者3","作者4","作者5"},
|
||||
{"作者11","作者12","作者13","作者14","作者15"},
|
||||
{"作者21","作者22","作者23","作者24","作者25"},
|
||||
{"作者31","作者32","作者33","作者34","作者35"}};
|
||||
Button button1,button2,button3,button4;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_person, container, false);
|
||||
init(view);
|
||||
return view;
|
||||
}
|
||||
private void init(View view) {
|
||||
listNew = view.findViewById(R.id.list_new);
|
||||
button1 = view.findViewById(R.id.bu1);
|
||||
button2 = view.findViewById(R.id.bu2);
|
||||
button3 = view.findViewById(R.id.bu3);
|
||||
button4 = view.findViewById(R.id.bu4);
|
||||
|
||||
|
||||
//监听器
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int data = getDataFromView(view);
|
||||
updateListView(data);
|
||||
}
|
||||
});
|
||||
|
||||
button2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int data = getDataFromView(view);
|
||||
updateListView(data);
|
||||
}
|
||||
});
|
||||
|
||||
button3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int data = getDataFromView(view);
|
||||
updateListView(data);
|
||||
}
|
||||
});
|
||||
|
||||
button4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int data=getDataFromView(view);
|
||||
updateListView(data);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
public int getDataFromView(View view) {
|
||||
if (view.getId() == R.id.bu1) {
|
||||
return onClick(view);
|
||||
} else if (view.getId() == R.id.bu2) {
|
||||
return onClick(view);
|
||||
} else if (view.getId() == R.id.bu3) {
|
||||
return onClick(view);
|
||||
} else if (view.getId() == R.id.bu4) {
|
||||
return onClick(view);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//适配器
|
||||
public void updateListView(int data) {
|
||||
lists=new ArrayList<>();
|
||||
for(int i=0;i<zuopin[data].length;i++){
|
||||
Map<String,Object>map=new HashMap<>();
|
||||
map.put("iv",iv[data][i]);
|
||||
map.put("zuopin",zuopin[data][i]);
|
||||
map.put("zuozhe",zuozhe[data][i]);
|
||||
lists.add(map);
|
||||
}
|
||||
adapter=new SimpleAdapter(requireContext(),lists,R.layout.item_person
|
||||
,new String[]{"iv","zuopin","zuozhe"}
|
||||
,new int[]{R.id.iv,R.id.zuopin,R.id.zuozhe});
|
||||
listNew.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("ResourceAsColor")
|
||||
public int onClick(View view) {
|
||||
if (view.getId() == R.id.bu1) {
|
||||
return 0;
|
||||
} else if (view.getId() == R.id.bu2) {
|
||||
return 1;
|
||||
} else if (view.getId() == R.id.bu3) {
|
||||
return 2;
|
||||
} else if (view.getId() == R.id.bu4) {
|
||||
return 3; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
@ -0,0 +1,31 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startY="49.59793"
|
||||
android:startX="42.9492"
|
||||
android:endY="92.4963"
|
||||
android:endX="85.84757"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</selector>
|
After Width: | Height: | Size: 577 KiB |
After Width: | Height: | Size: 895 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 45 KiB |
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M20,1v3h3v2h-3v3h-2L18,6h-3L15,4h3L18,1h2zM12,13c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM14,3.25L14,7h3v3h2.92c0.05,0.39 0.08,0.79 0.08,1.2 0,3.32 -2.67,7.25 -8,11.8 -5.33,-4.55 -8,-8.48 -8,-11.8C4,6.22 7.8,3 12,3c0.68,0 1.35,0.08 2,0.25z"/>
|
||||
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M9,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8 0,-0.29 0.02,-0.58 0.05,-0.86 2.36,-1.05 4.23,-2.98 5.21,-5.37C11.07,8.33 14.05,10 17.42,10c0.78,0 1.53,-0.09 2.25,-0.26 0.21,0.71 0.33,1.47 0.33,2.26 0,4.41 -3.59,8 -8,8z"/>
|
||||
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
|
||||
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,3v10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4V7h4V3h-6z"/>
|
||||
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12.65,10C11.83,7.67 9.61,6 7,6c-3.31,0 -6,2.69 -6,6s2.69,6 6,6c2.61,0 4.83,-1.67 5.65,-4H17v4h4v-4h2v-4H12.65zM7,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
|
||||
|
||||
</vector>
|
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 1.2 MiB |
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</selector>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<solid android:color="#000000"/>
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="#000000"/>
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<solid android:color="#006400"/>
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="#c0c0c0"/>
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 857 B |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
After Width: | Height: | Size: 56 KiB |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 465 B |
After Width: | Height: | Size: 447 B |
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/baseline_music_note_24"/>
|
||||
</selector>
|
After Width: | Height: | Size: 570 B |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/pink"/>
|
||||
<corners android:radius="20dp" /> <!-- Adjust the radius to change the amount of rounding -->
|
||||
<stroke
|
||||
android:color="@android:color/white"
|
||||
android:width="1dp" />
|
||||
</shape>
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 333 KiB |
After Width: | Height: | Size: 194 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 392 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 338 KiB |
@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M9,8m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" android:strokeAlpha="0.3"/>
|
||||
|
||||
<path android:fillAlpha="0.3" android:fillColor="@android:color/white" android:pathData="M14.48,16.34C13.29,15.73 11.37,15 9,15c-2.37,0 -4.29,0.73 -5.48,1.34C3.2,16.5 3,16.84 3,17.22V18h12v-0.78C15,16.84 14.8,16.5 14.48,16.34z" android:strokeAlpha="0.3"/>
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M9,12c2.21,0 4,-1.79 4,-4c0,-2.21 -1.79,-4 -4,-4S5,5.79 5,8C5,10.21 6.79,12 9,12zM9,6c1.1,0 2,0.9 2,2c0,1.1 -0.9,2 -2,2S7,9.1 7,8C7,6.9 7.9,6 9,6z"/>
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M20,9l0,-3l-2,0l0,3l-3,0l0,2l3,0l0,3l2,0l0,-3l3,0l0,-2z"/>
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M15.39,14.56C13.71,13.7 11.53,13 9,13c-2.53,0 -4.71,0.7 -6.39,1.56C1.61,15.07 1,16.1 1,17.22V20h16v-2.78C17,16.1 16.39,15.07 15.39,14.56zM15,18H3v-0.78c0,-0.38 0.2,-0.72 0.52,-0.88C4.71,15.73 6.63,15 9,15c2.37,0 4.29,0.73 5.48,1.34C14.8,16.5 15,16.84 15,17.22V18z"/>
|
||||
|
||||
</vector>
|
@ -0,0 +1,33 @@
|
||||
<?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:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity"
|
||||
android:background="@color/pink">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Pink"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<android.widget.Button
|
||||
android:id="@+id/button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/one"
|
||||
android:textSize="45dp"
|
||||
android:gravity="top|center"
|
||||
android:paddingTop="100dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/palevioletred1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="HelloKitty 音乐"
|
||||
tools:ignore="MissingConstraints,UnknownId"
|
||||
android:background="@drawable/fengmianbackground"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<!--首页-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/gaohan1">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@drawable/music"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="音乐"
|
||||
android:id="@+id/wenzi1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/gaohan2">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@drawable/find"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="发现"
|
||||
android:id="@+id/wenzi2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/gaohan3">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@drawable/live"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="直播"
|
||||
android:id="@+id/wenzi3"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/gaohan4">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@drawable/person"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="主页"
|
||||
android:id="@+id/wenzi4"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/tupianbackground8">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="9"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="搜索"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/palevioletred"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<EditText
|
||||
android:id="@+id/search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="45"
|
||||
android:gravity="center"
|
||||
android:hint="猜你想搜青花瓷"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<ImageButton
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:onClick="sousuo"
|
||||
android:background="@drawable/sousuo"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="10dp">
|
||||
<Button
|
||||
android:id="@+id/b1"
|
||||
android:onClick="ritui"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="歌手分类" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="10dp">
|
||||
<Button
|
||||
android:id="@+id/b2"
|
||||
android:onClick="paihang"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="排行榜" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="10dp">
|
||||
<Button
|
||||
android:id="@+id/b3"
|
||||
android:onClick="xihuan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="听歌识曲" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="10dp">
|
||||
<Button
|
||||
android:id="@+id/b4"
|
||||
android:onClick="xihuan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="自助发歌" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 列表 -->
|
||||
<ListView
|
||||
android:id="@+id/list_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:divider="@android:color/darker_gray"
|
||||
android:dividerHeight="1dp"/>
|
||||
|
||||
<!-- 右侧内容显示区域 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<!-- 歌单列表 -->
|
||||
<ListView
|
||||
android:id="@+id/playlist_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/pink"
|
||||
android:padding="10dp">
|
||||
<ImageButton
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/tuijian3"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<TextView
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="正在播放的音乐"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="10dp"/>
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:background="@drawable/bofanganniu"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<ImageButton
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:background="@drawable/liebiao2"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/tupianbackground5">
|
||||
|
||||
<!-- 垂直布局 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 文字提示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="这里有你想看、爱看的直播"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/palevioletred"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,264 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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="3"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="搜索"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/palevioletred"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<EditText
|
||||
android:id="@+id/search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="45"
|
||||
android:hint="猜你想搜青花瓷"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:layout_marginRight="15dp"/>
|
||||
<ImageButton
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:onClick="sousuo"
|
||||
android:background="@drawable/sousuo"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="5dp">
|
||||
<Button
|
||||
android:id="@+id/mrtj"
|
||||
android:onClick="ritui"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="每日推荐"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="5dp">
|
||||
<Button
|
||||
android:id="@+id/phb"
|
||||
android:onClick="paihang"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="排行榜"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp">
|
||||
<Button
|
||||
android:id="@+id/cnxh"
|
||||
android:onClick="xihuan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="猜你喜欢"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="6"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="专属推荐"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/palevioletred"
|
||||
android:layout_gravity="left" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="5dp">
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@drawable/tuijian3"
|
||||
android:layout_marginRight="20dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="音乐名字1"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/violet"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="作者1"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/violet"/>
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bofang"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="5dp">
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@drawable/tuijian2"
|
||||
android:layout_marginRight="20dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="音乐名字2"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/violet"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="作者2"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/violet"/>
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bofang"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="5dp">
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@drawable/tuijian1"
|
||||
android:layout_marginRight="20dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="音乐名字3"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/violet"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="作者3"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/violet"/>
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bofang"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/pink"
|
||||
android:padding="10dp">
|
||||
<ImageButton
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/tuijian3"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<TextView
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="正在播放的音乐"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="10dp"/>
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:background="@drawable/bofanganniu"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<ImageButton
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:background="@drawable/liebiao2"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/pink2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/lightpink">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left">
|
||||
<Button
|
||||
android:id="@+id/tcdl"
|
||||
android:text="退出登录"
|
||||
android:textSize="16sp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="tuichudenglu"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="个人界面"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/palevioletred"
|
||||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="right">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/sousuo"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="6"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/tupianbackground12">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="11"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<include layout="@layout/layout_person0" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/gequ"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="8"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/layout_person1" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/pink"
|
||||
android:padding="10dp">
|
||||
<ImageButton
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/tuijian3"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<TextView
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="正在播放的音乐"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="10dp"/>
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:background="@drawable/bofanganniu"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<ImageButton
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:background="@drawable/liebiao2"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
tools:context=".IndexActivity">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/gaohan"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp">
|
||||
<!--底部导航-->
|
||||
<include layout="@layout/content"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp">
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:id="@+id/iv"
|
||||
android:layout_centerVertical="true"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="作品名字"
|
||||
android:id="@+id/zuopin"
|
||||
android:textSize="20sp"
|
||||
android:layout_alignTop="@id/iv"
|
||||
android:layout_toRightOf="@id/iv"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:textColor="@color/pink"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="作者"
|
||||
|
||||
android:id="@+id/zuozhe1"
|
||||
android:textSize="20sp"
|
||||
android:layout_alignTop="@id/iv"
|
||||
android:layout_toRightOf="@id/iv"
|
||||
android:layout_marginTop="70dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:textColor="@color/pink"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="作者名字"
|
||||
android:id="@+id/zuozhe"
|
||||
android:textSize="20sp"
|
||||
android:layout_alignTop="@id/iv"
|
||||
android:layout_toRightOf="@id/iv"
|
||||
android:layout_marginTop="70dp"
|
||||
android:layout_marginLeft="130dp"
|
||||
android:textColor="@color/pink"/>
|
||||
</RelativeLayout>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:id="@+id/bu1"
|
||||
android:layout_weight="1"
|
||||
android:text="收藏"
|
||||
android:textSize="16sp"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:id="@+id/bu2"
|
||||
android:layout_weight="1"
|
||||
android:text="我喜欢"
|
||||
android:textSize="16sp"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:id="@+id/bu3"
|
||||
android:layout_weight="1"
|
||||
android:text="下载"
|
||||
android:textSize="16sp"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:id="@+id/bu4"
|
||||
android:layout_weight="1"
|
||||
android:text="已购买"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/list_new"/>
|
||||
</LinearLayout>
|
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/tupianbackground4">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/note" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="登录界面"
|
||||
android:textColor="@color/palevioletred"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="italic" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/baseline_face_24"/>
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="60dp"
|
||||
android:hint="username"
|
||||
android:maxLength="10"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textColorHint="@color/pink" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/baseline_vpn_key_24"/>
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="60dp"
|
||||
android:hint="password"
|
||||
android:maxLength="16"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:inputType="textPassword"
|
||||
android:textColorHint="@color/pink"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:onClick="denglu"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="50dp"
|
||||
android:textSize="18sp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="60dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:text="登录"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/regist"
|
||||
android:onClick="zhuce"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="50dp"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="#FFFFFF"
|
||||
android:text="注册" />
|
||||
</LinearLayout>
|
@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/tupianbackground2">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/baseline_music_note_24"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="italic"
|
||||
android:text="注册界面"
|
||||
android:textColor="@color/palevioletred" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/baseline_face_24"/>
|
||||
<EditText
|
||||
android:layout_width="290dp"
|
||||
android:layout_height="60dp"
|
||||
android:id="@+id/reg_username"
|
||||
android:textAlignment="center"
|
||||
android:maxLength="10"
|
||||
android:maxLines="1"
|
||||
android:hint="用户名10位"
|
||||
android:textColorHint="@color/pink"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/baseline_vpn_key_24"/>
|
||||
<EditText
|
||||
android:layout_width="290dp"
|
||||
android:layout_height="60dp"
|
||||
android:id="@+id/reg_password"
|
||||
android:textAlignment="center"
|
||||
android:maxLength="16"
|
||||
android:maxLines="1"
|
||||
android:inputType="numberPassword"
|
||||
android:hint="密码6-16位"
|
||||
android:textColorHint="@color/pink"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/baseline_lock_24"/>
|
||||
<EditText
|
||||
android:layout_width="290dp"
|
||||
android:layout_height="60dp"
|
||||
android:id="@+id/reg_sure_password"
|
||||
android:textAlignment="center"
|
||||
android:maxLength="16"
|
||||
android:maxLines="1"
|
||||
android:inputType="numberPassword"
|
||||
android:hint="再次输入密码"
|
||||
android:textColorHint="@color/pink"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/twotone_person_add_alt_24"/>
|
||||
<RadioGroup
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/rp">
|
||||
<RadioButton
|
||||
android:id="@+id/man"
|
||||
android:layout_width="wrap_content"
|
||||
android:checked="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="男"
|
||||
android:textColor="@color/palevioletred"/>
|
||||
<RadioButton
|
||||
android:id="@+id/woman"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="女"
|
||||
android:textColor="@color/palevioletred"/>
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/fuxian"
|
||||
android:text="爱好: "
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/palevioletred"/>
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/chang"
|
||||
android:text="唱 "
|
||||
android:textColor="@color/palevioletred"
|
||||
android:textSize="16sp">
|
||||
</CheckBox>
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tiao"
|
||||
android:text="跳 "
|
||||
android:textColor="@color/palevioletred"
|
||||
android:textSize="16sp">
|
||||
</CheckBox>
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/rap"
|
||||
android:textColor="@color/palevioletred"
|
||||
android:text="rap "
|
||||
android:textSize="16sp">
|
||||
</CheckBox>
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/basketball"
|
||||
android:text="篮球 "
|
||||
android:textColor="@color/palevioletred"
|
||||
android:textSize="16sp">
|
||||
</CheckBox>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="80dp">
|
||||
<Button
|
||||
android:id="@+id/reg_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:onClick="qdzhuce"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:background="@drawable/button_login"
|
||||
android:textColor="#FFFFFF"
|
||||
android:text="注册"/>
|
||||
<Button
|
||||
android:id="@+id/quxiao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:onClick="fanhui"
|
||||
android:textSize="18sp"
|
||||
android:background="@drawable/button_login"
|
||||
android:textColor="#FFFFFF"
|
||||
android:text="取消"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.3 KiB |