@ -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,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetSelector">
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2024-03-31T04:14:16.849860400Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\XXX\.android\avd\Pixel_2_XL_API_34.avd" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
<DialogSelection />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</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,9 @@
|
||||
<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>
|
||||
</project>
|
@ -0,0 +1 @@
|
||||
/build
|
@ -0,0 +1,41 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.goukumusic"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.example.goukumusic"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
buildToolsVersion = "34.0.0"
|
||||
}
|
||||
|
||||
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.goukumusic;
|
||||
|
||||
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.goukumusic", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<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/AppTheme"
|
||||
tools:targetApi="27">
|
||||
|
||||
<activity
|
||||
android:name=".ForgetPassword"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Register"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".LoginSuccess"
|
||||
android:exported="false" />
|
||||
<activity android:name=".FragmentList"
|
||||
android:exported="false"/>
|
||||
<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>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,53 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.w3c.dom.Text;
|
||||
|
||||
|
||||
public class ContentFragment extends Fragment {
|
||||
private View view;
|
||||
private TextView text1,text2;
|
||||
private ImageView imageView;
|
||||
// public void onAttach(Activity activity){
|
||||
// super.onAttach(activity);
|
||||
// }
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle saveInstanceState){
|
||||
// 获取布局文件
|
||||
view = inflater.inflate(R.layout.fragment_content, container,false);
|
||||
if (view != null){
|
||||
init();
|
||||
}
|
||||
// 获取Activity中设置的文字
|
||||
setText(((FragmentList)getActivity()).getSettingText()[0]);
|
||||
return view;
|
||||
}
|
||||
private void init(){
|
||||
text1 = (TextView) view.findViewById(R.id.show_title);
|
||||
text2 = (TextView) view.findViewById(R.id.show_content);
|
||||
imageView = (ImageView) view.findViewById(R.id.show_image);
|
||||
}
|
||||
public void setText(String[] text){
|
||||
text1.setText(text[0]);
|
||||
text2.setText(text[1]);
|
||||
}
|
||||
// 设置图片方法
|
||||
public void setImage(int imageIndex){
|
||||
// 获取Activity中的图片资源数组
|
||||
int[] imageResources = ((FragmentList) getActivity()).getImageResources();
|
||||
// 检查图片索引是否有效
|
||||
if (imageIndex >= 0 && imageIndex < imageResources.length) {
|
||||
// 根据图片索引设置图片资源
|
||||
imageView.setImageResource(imageResources[imageIndex]);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
public class ForgetPassword extends AppCompatActivity {
|
||||
|
||||
private EditText UserName,Password,Password_again;
|
||||
private Button Btn_return;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_forget_password);
|
||||
setTitle("狗酷音乐新用户注册");
|
||||
// 添加监控
|
||||
UserName = (EditText) findViewById(R.id.username);
|
||||
Password = (EditText) findViewById(R.id.password);
|
||||
Password = (EditText) findViewById(R.id.password_again);
|
||||
Button btn_forget_pwd = (Button) findViewById(R.id.btn_forget_pwd);
|
||||
Btn_return = (Button) findViewById(R.id.btn_return);
|
||||
|
||||
// 设置注册按钮btn_register监听器
|
||||
btn_forget_pwd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_register = new Intent(ForgetPassword.this, MainActivity.class);
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("usre_name", UserName.getText().toString());
|
||||
bundle1.putString("user_password", Password.getText().toString());
|
||||
bundle1.putString("user_password_again",Password_again.getText().toString());
|
||||
intent_register.putExtras(bundle1); //上传注册的参数
|
||||
startActivity(intent_register);
|
||||
}
|
||||
});
|
||||
|
||||
// 设置返回按钮btn_return监听器
|
||||
Btn_return.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_return = new Intent(ForgetPassword.this, MainActivity.class);
|
||||
startActivity(intent_return);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
public class Fragment_audio extends Fragment {
|
||||
Button Btn_shouye, Btn_fenlei;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
// 创建 Fragment 布局
|
||||
View rootView = inflater.inflate(R.layout.audio, container, false);
|
||||
|
||||
// 找到按钮控件
|
||||
Btn_fenlei = rootView.findViewById(R.id.btn_fenlei);
|
||||
|
||||
// 设置按钮点击监听器
|
||||
Btn_fenlei.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// 在按钮点击时执行的操作
|
||||
// 创建跳转到 FragmentList 活动界面的 Intent
|
||||
Intent intent = new Intent(getActivity(),FragmentList.class);
|
||||
// 启动 FragmentList 活动界面
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
return rootView;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
public class Fragment_singer extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle saveInstanceState){
|
||||
// 创建Fragment布局
|
||||
return inflater.inflate(R.layout.singer,container,false);
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
public class Fragment_singleinformation extends Fragment {
|
||||
@Override
|
||||
public View onCreateView( LayoutInflater inflater,ViewGroup container,Bundle saveInstanceState){
|
||||
// 创建Fragment布局
|
||||
return inflater.inflate(R.layout.information,container,false);
|
||||
}
|
||||
// @Override
|
||||
// protected void onCreate(Bundle savedInstanceStat){
|
||||
// TextView Name = (TextView) findViewById(R.id.username);
|
||||
//// TextView Password = (TextView) findViewById(R.id.password);
|
||||
// // 接受上传的参数
|
||||
// Intent intent = this.getIntent();
|
||||
// Bundle bundle = intent.getExtras();
|
||||
// assert bundle != null;
|
||||
// String username = bundle.getString("user_name");
|
||||
// String password = bundle.getString("user_password");
|
||||
// // 将接受的参数和文件控件绑定
|
||||
// Name.setText(String.format("用户名: %s", username));
|
||||
//// Password.setText(String.format("密码: %s", password));
|
||||
// Button button2 = (Button) findViewById(R.id.btn_return_login);
|
||||
// button2.setOnClickListener(new View.OnClickListener() { // 设置按钮的监听器
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// // 创建intent对象
|
||||
// Intent intent = new Intent(LoginSuccess.this,MainActivity.class);
|
||||
// startActivity(intent); //启动Activity
|
||||
// finish(); //关闭Activity
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Fragment_song extends Fragment {
|
||||
private ListView mListView;
|
||||
private MyAdapter myAdapter;
|
||||
private List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
// 创建Fragment布局
|
||||
View rootView = inflater.inflate(R.layout.song, container, false);
|
||||
initData();
|
||||
mListView = rootView.findViewById(R.id.listview);
|
||||
myAdapter = new MyAdapter(list, getActivity()); // 传入 getActivity() 获取关联的 Activity 上下文
|
||||
mListView.setAdapter(myAdapter);
|
||||
return rootView;
|
||||
}
|
||||
|
||||
// 自定义数据,也可以添加网络数据
|
||||
private void initData(){
|
||||
Map<String,Object> map = new HashMap<String, Object>();
|
||||
map.put("img",R.drawable.beijinglife);
|
||||
map.put("textview1","薛之谦");
|
||||
map.put("textview2","那是你离开了北京的生活");
|
||||
map.put("button","播放");
|
||||
list.add(map);
|
||||
|
||||
map = new HashMap<String, Object>();
|
||||
map.put("img",R.drawable.believe);
|
||||
map.put("textview1","周杰伦");
|
||||
map.put("textview2","我是如此相信");
|
||||
map.put("button","播放");
|
||||
list.add(map);
|
||||
|
||||
map = new HashMap<String, Object>();
|
||||
map.put("img",R.drawable.qishi);
|
||||
map.put("textview1","薛之谦");
|
||||
map.put("textview2","其实");
|
||||
map.put("button","播放");
|
||||
list.add(map);
|
||||
|
||||
map = new HashMap<String, Object>();
|
||||
map.put("img",R.drawable.towardsun);
|
||||
map.put("textview1","华晨宇");
|
||||
map.put("textview2","向阳而生");
|
||||
map.put("button","播放");
|
||||
list.add(map);
|
||||
|
||||
map = new HashMap<String, Object>();
|
||||
map.put("img",R.drawable.yanhuochenai);
|
||||
map.put("textview1","华晨宇");
|
||||
map.put("textview2","烟火里的尘埃");
|
||||
map.put("button","播放");
|
||||
list.add(map);
|
||||
|
||||
map = new HashMap<String, Object>();
|
||||
map.put("img",R.drawable.zuiweida);
|
||||
map.put("textview1","周杰伦");
|
||||
map.put("textview2","最伟大的作品");
|
||||
map.put("button","播放");
|
||||
list.add(map);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
/**
|
||||
* author:xiaotao
|
||||
*/
|
||||
private EditText UserName,Password;
|
||||
private Button Btn_login,Btn_tv_register,Btn_tv_find_pwd;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
//组件初始化,获取获取
|
||||
UserName = (EditText)findViewById(R.id.username);
|
||||
Password = (EditText)findViewById(R.id.password);
|
||||
Btn_login = (Button) findViewById(R.id.btn_login);
|
||||
Btn_tv_register = (Button) findViewById(R.id.btn_tv_register);
|
||||
Btn_tv_find_pwd = (Button) findViewById(R.id.btn_tv_find_pwd);
|
||||
|
||||
// 设置登录按钮Btn_login监听器
|
||||
Btn_login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_login = new Intent(MainActivity.this, LoginSuccess.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("user_name", UserName.getText().toString());
|
||||
bundle.putString("user_password", Password.getText().toString());
|
||||
intent_login.putExtras(bundle); // 上传参数
|
||||
startActivity(intent_login);
|
||||
}
|
||||
});
|
||||
|
||||
// 设置立即注册按钮Btn_tv_register监听器
|
||||
Btn_tv_register.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_register = new Intent(MainActivity.this, Register.class);
|
||||
startActivity(intent_register);
|
||||
}
|
||||
});
|
||||
|
||||
// 设置忘记密码按钮Btn_tv_find_pwd监听器
|
||||
Btn_tv_find_pwd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_find_pwd = new Intent(MainActivity.this, ForgetPassword.class);
|
||||
startActivity(intent_find_pwd);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MyAdapter extends BaseAdapter {
|
||||
// 设置变量
|
||||
private List<Map<String, Object>> datas;
|
||||
private Context mContext;
|
||||
// 构造函数
|
||||
public MyAdapter(List<Map<String, Object>> datas, Context mContext) {
|
||||
this.datas = datas;
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
// 返回数据的总数
|
||||
return datas.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
// 返回所在的位置的数据内容
|
||||
return datas.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
// 返回数据所在的位置
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
final ViewHolder holder;
|
||||
if(convertView == null){
|
||||
// 使用自定义布局文件作为Layout
|
||||
convertView = LayoutInflater.from(mContext).inflate(R.layout.list_item_layout, null);
|
||||
// 减少findView的次数
|
||||
holder = new ViewHolder();
|
||||
// 初始化布局中的元素
|
||||
holder.mImageView = (ImageView) convertView.findViewById(R.id.imageview);
|
||||
holder.mTextView1 = (TextView) convertView.findViewById(R.id.textview1);
|
||||
holder.mTextView2 = (TextView) convertView.findViewById(R.id.textview2);
|
||||
holder.mButton = (Button) convertView.findViewById(R.id.button);
|
||||
holder.mButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText(mContext,"播放音乐",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
convertView.setTag(holder);
|
||||
}else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
// 将传入的数据中提取数据并绑定到指定的View中
|
||||
holder.mImageView.setImageResource((Integer) datas.get(position).get("img"));
|
||||
holder.mTextView1.setText(datas.get(position).get("textview1").toString());
|
||||
holder.mTextView2.setText(datas.get(position).get("textview2").toString());
|
||||
holder.mButton.setText(datas.get(position).get("button").toString());
|
||||
return convertView;
|
||||
}
|
||||
|
||||
// 定义一个静态的ViewHolder
|
||||
static class ViewHolder{
|
||||
ImageView mImageView;
|
||||
TextView mTextView1;
|
||||
TextView mTextView2;
|
||||
Button mButton;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.example.goukumusic;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
public class Register extends AppCompatActivity {
|
||||
|
||||
private EditText UserName,Password;
|
||||
private Button Btn_register;
|
||||
private Button Btn_return;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_register);
|
||||
setTitle("狗酷音乐新用户注册");
|
||||
// 添加监控
|
||||
UserName = (EditText) findViewById(R.id.username);
|
||||
Password = (EditText) findViewById(R.id.password);
|
||||
Btn_register = (Button) findViewById(R.id.btn_register);
|
||||
Btn_return = (Button) findViewById(R.id.btn_return);
|
||||
|
||||
// 设置注册按钮btn_register监听器
|
||||
Btn_register.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_register = new Intent(Register.this, MainActivity.class);
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("user_name", UserName.getText().toString());
|
||||
bundle1.putString("user_password", Password.getText().toString());
|
||||
intent_register.putExtras(bundle1); //上传注册的参数
|
||||
startActivity(intent_register);
|
||||
}
|
||||
});
|
||||
|
||||
// 设置返回按钮btn_return监听器
|
||||
Btn_return.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent_return = new Intent(Register.this, MainActivity.class);
|
||||
startActivity(intent_return);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 834 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 3.3 MiB |
After Width: | Height: | Size: 364 KiB |
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- <!– 填充的颜色 –>-->
|
||||
<solid android:color="#2196F3" />
|
||||
<!-- 边框颜色 -->
|
||||
<stroke android:color= "#2196F3"
|
||||
android:width="2dip"/>
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="180dip" />
|
||||
</shape>
|
@ -0,0 +1,20 @@
|
||||
<!-- res/drawable/circular_border.xml -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 底部图层,圆形图片 -->
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<!-- 这里放入你的圆形图片 -->
|
||||
<padding android:left="5dp" android:right="5dp" android:top="5dp" android:bottom="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 顶部图层,边框 -->
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="#FF0000" /> <!-- 设置边框颜色和宽度 -->
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 658 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 473 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 418 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>
|
@ -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>
|
After Width: | Height: | Size: 557 KiB |
After Width: | Height: | Size: 260 KiB |
After Width: | Height: | Size: 301 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 354 KiB |
After Width: | Height: | Size: 883 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 506 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 444 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 508 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 552 KiB |
After Width: | Height: | Size: 874 KiB |
After Width: | Height: | Size: 569 KiB |
After Width: | Height: | Size: 752 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 15 MiB |
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fragment_list"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="#41C9E2"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="听 书"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ACE2E1"
|
||||
android:textSize="40sp"/>
|
||||
<TableRow
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_shouye"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text=" 首 页 "
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:background="#00FFFFFF"/>
|
||||
<!--layout_weight="1" layout_width="0dp"实现均分效果-->
|
||||
<Button
|
||||
android:id="@+id/btn_fenlei"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text=" 分 类 "
|
||||
android:textColor="#008DDA"
|
||||
android:textSize="30sp"
|
||||
tools:ignore="HardcodedText"
|
||||
android:textStyle="bold"
|
||||
android:background="#00FFFFFF"/>
|
||||
</TableRow>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
tools:context=".FragmentList"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 标题-->
|
||||
<FrameLayout
|
||||
android:id="@+id/settitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent">
|
||||
</FrameLayout>
|
||||
<!-- 内容-->
|
||||
<FrameLayout
|
||||
android:id="@+id/setcontent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</TableLayout>
|
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一个LinearLayout为装Fragment的容器-->
|
||||
<LinearLayout
|
||||
android:id="@+id/content_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@id/bottom_tab"
|
||||
android:background="@color/design_default_color_error" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_tab"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/mibai"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/song"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="Suspicious0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageone"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/song"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/one"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="歌曲"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/singer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="Suspicious0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imagetwo"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/singer"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/two"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="歌手信息"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/audio"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="Suspicious0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imagethree"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/audio"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/three"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="音频"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/singleinformation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="Suspicious0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imagefour"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/singleinformation"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/four"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="个人信息"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="#41C9E2"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="听 书"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ACE2E1"
|
||||
android:textSize="40sp"/>
|
||||
<TableRow
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_shouye"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text=" 首 页 "
|
||||
android:textColor="#008DDA"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:background="#00FFFFFF"/>
|
||||
<!--layout_weight="1" layout_width="0dp"实现均分效果-->
|
||||
<Button
|
||||
android:id="@+id/btn_fenlei"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text=" 分 类 "
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="30sp"
|
||||
tools:ignore="HardcodedText"
|
||||
android:textStyle="bold"
|
||||
android:background="#00FFFFFF"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="20dp">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginStart="13dp"
|
||||
android:src="@drawable/luoxiang"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="罗翔:今日说法"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:src="@drawable/zhua"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="抓落叶"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginStart="13dp"
|
||||
android:src="@drawable/doupo"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="斗破苍穹"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:src="@drawable/tiancai"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="天才与疯子"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ContentFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/show_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:text="显示新闻标题"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/show_image"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="260dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/show_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textSize="20sp"
|
||||
android:text="显示新闻内容"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".TitleFragment">
|
||||
|
||||
<!-- 用来展示新闻标题列表-->
|
||||
<ListView
|
||||
android:id="@+id/titlelist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
</ListView>
|
||||
</LinearLayout>
|
@ -0,0 +1,51 @@
|
||||
<?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="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 设置图片-->
|
||||
<ImageView
|
||||
android:id="@+id/imageview"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="105dp"/>
|
||||
<!-- 设置文本-->
|
||||
<LinearLayout
|
||||
android:layout_width="225dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="26sp"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/mibai"
|
||||
android:background="@drawable/buttonstyle"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/huise"/>
|
||||
</LinearLayout>
|
@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:background="#41C9E2"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="歌手简介"
|
||||
android:textColor="#ACE2E1"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:textSize="40sp"/>
|
||||
<TableRow>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/zjl"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="周杰伦"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/mby"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="毛不易"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/syz"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="孙燕姿"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/zbc"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="张碧晨"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/hcy"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="华晨宇"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/dzq"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="邓紫棋"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/xzq"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="薛之谦"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/iu"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="IU"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/circular_border"
|
||||
android:src="@drawable/zj"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="张杰"
|
||||
android:textSize="25sp"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#41C9E2"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,13 @@
|
||||
<?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">
|
||||
|
||||
<!-- 用来展示新闻标题列表-->
|
||||
<TextView
|
||||
android:id="@+id/titles"
|
||||
android:layout_width="match_parent"
|
||||
android:textSize="20sp"
|
||||
android:layout_height="wrap_content">
|
||||
</TextView>
|
||||
</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: 982 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 7.6 KiB |
@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.GouKuMusic" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="mibai">#F7EEDD</color>
|
||||
<color name="colorPrimary">#008DDA</color>
|
||||
<color name="colorPrimaryDark">#41C9E2</color>
|
||||
<color name="colorAccent">#ACE2E1</color>
|
||||
<color name="huise">#8a8a8a</color>
|
||||
</resources>
|
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">GouKuMusic</string>
|
||||
<string name="button">Button</string>
|
||||
<string name="button1">Button</string>
|
||||
<string name="login_success_title">欢迎来到狗酷音乐</string>
|
||||
<string name="return_login"> 退 出 </string>
|
||||
</resources>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Base application theme -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item> <!-- 设置应用的主题色 -->
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <!-- 设置应用的状态栏颜色 -->
|
||||
<item name="colorAccent">@color/colorAccent</item> <!-- 设置强调颜色 -->
|
||||
</style>
|
||||
|
||||
<style name="ButtonStyle" parent="Widget.AppCompat.Button">
|
||||
<!-- 设置按钮颜色-->
|
||||
<item name="android:background">@color/colorAccent</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,9 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.GouKuMusic" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.GouKuMusic" parent="Base.Theme.GouKuMusic" />
|
||||
</resources>
|