将剩下所有页面完善以及美化,增加数据打乱以及跳转时的字以及图片变色

This commit is contained in:
tanc 2024-06-14 15:40:07 +08:00
parent f7102f5a63
commit e7448667ce
23 changed files with 128 additions and 50 deletions

View File

@ -56,5 +56,13 @@ dependencies {
implementation ("io.github.lucksiege:ucrop:v3.11.2") implementation ("io.github.lucksiege:ucrop:v3.11.2")
implementation ("io.github.lucksiege:camerax:v3.11.2") implementation ("io.github.lucksiege:camerax:v3.11.2")
implementation ("com.github.bumptech.glide:glide:4.15.1") implementation ("com.github.bumptech.glide:glide:4.15.1")
implementation ("io.github.scwang90:refresh-layout-kernel:2.1.0") //核心必须依赖
implementation ("io.github.scwang90:refresh-header-classics:2.1.0") //经典刷新头
implementation ("io.github.scwang90:refresh-header-radar:2.1.0") //雷达刷新头
implementation ("io.github.scwang90:refresh-header-falsify:2.1.0") //虚拟刷新头
implementation ("io.github.scwang90:refresh-header-material:2.1.0") //谷歌刷新头
implementation ("io.github.scwang90:refresh-header-two-level:2.1.0") //二级刷新头
implementation ("io.github.scwang90:refresh-footer-ball:2.1.0") //球脉冲加载
implementation ("io.github.scwang90:refresh-footer-classics:2.1.0")
} }

View File

@ -79,7 +79,7 @@
android:name=".ViewStart" android:name=".ViewStart"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".welcome" android:name=".Welcome"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -30,7 +30,7 @@ public class Help2 extends AppCompatActivity {
PropertyValuesHolder propertyValuesHolder2 = PropertyValuesHolder.ofFloat("scaleY", 1,3,1); PropertyValuesHolder propertyValuesHolder2 = PropertyValuesHolder.ofFloat("scaleY", 1,3,1);
PropertyValuesHolder propertyValuesHolder3 = PropertyValuesHolder.ofFloat("alpha", 0,1); PropertyValuesHolder propertyValuesHolder3 = PropertyValuesHolder.ofFloat("alpha", 0,1);
ValueAnimator animator = ObjectAnimator.ofPropertyValuesHolder(imageView, propertyValuesHolder, propertyValuesHolder2, propertyValuesHolder3); ValueAnimator animator = ObjectAnimator.ofPropertyValuesHolder(imageView, propertyValuesHolder, propertyValuesHolder2, propertyValuesHolder3);
animator.setDuration(1000); animator.setDuration(500);
animator.start(); animator.start();
} }
}); });

View File

@ -3,13 +3,14 @@ package com.example.liyueling_final;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
public class Helpback extends AppCompatActivity { public class Helpback extends AppCompatActivity {
Button button1, button2; Button button1, button2;
boolean isButton1Selected = false;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -22,31 +23,37 @@ public class Helpback extends AppCompatActivity {
finish(); finish();
} }
}); });
View.OnClickListener listener = new View.OnClickListener() {
button1.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
switchButtonColors(); isButton1Selected = !isButton1Selected;
updateButtonColors();
} }
}; });
button1.setOnClickListener(listener); button2.setOnClickListener(new View.OnClickListener() {
button2.setOnClickListener(listener); @Override
public void onClick(View v) {
isButton1Selected = !isButton1Selected;
updateButtonColors();
}
});
} }
private void switchButtonColors() { private void updateButtonColors() {
// 获取当前按钮的背景颜色 if (isButton1Selected) {
int button1BackgroundColor = ((ColorDrawable) button1.getBackground()).getColor(); button1.setBackground(ContextCompat.getDrawable(this, R.drawable.selected_button_background));
int button2BackgroundColor = ((ColorDrawable) button2.getBackground()).getColor(); button1.setTextColor(ContextCompat.getColor(this, R.color.selected_button_text_color));
// 获取当前按钮的文本颜色 button2.setBackground(ContextCompat.getDrawable(this, R.drawable.unselected_button_background));
int button1TextColor = button1.getCurrentTextColor(); button2.setTextColor(ContextCompat.getColor(this, R.color.unselected_button_text_color));
int button2TextColor = button2.getCurrentTextColor(); } else {
button2.setBackground(ContextCompat.getDrawable(this, R.drawable.selected_button_background));
button2.setTextColor(ContextCompat.getColor(this, R.color.selected_button_text_color));
// 交换按钮的背景颜色和文本颜色 button1.setBackground(ContextCompat.getDrawable(this, R.drawable.unselected_button_background));
button1.setBackgroundColor(button2BackgroundColor); button1.setTextColor(ContextCompat.getColor(this, R.color.unselected_button_text_color));
button2.setBackgroundColor(button1BackgroundColor); }
button1.setTextColor(button2TextColor);
button2.setTextColor(button1TextColor);
} }
} }

View File

@ -56,6 +56,10 @@ public class MainFragment extends Fragment {
getActivity().getSupportFragmentManager().beginTransaction() getActivity().getSupportFragmentManager().beginTransaction()
.show(mainhomeFragment).hide(maingoodFragment).hide(mainexpertFragment).hide(mainmajorFragment) .show(mainhomeFragment).hide(maingoodFragment).hide(mainexpertFragment).hide(mainmajorFragment)
.commit(); .commit();
constraintLayout.setSelected(true);
constraintLayout2.setSelected(false);
constraintLayout3.setSelected(false);
constraintLayout4.setSelected(false);
} }
}); });
@ -67,6 +71,10 @@ public class MainFragment extends Fragment {
getActivity().getSupportFragmentManager().beginTransaction() getActivity().getSupportFragmentManager().beginTransaction()
.show(maingoodFragment).hide(mainhomeFragment).hide(mainexpertFragment).hide(mainmajorFragment) .show(maingoodFragment).hide(mainhomeFragment).hide(mainexpertFragment).hide(mainmajorFragment)
.commit(); .commit();
constraintLayout2.setSelected(true);
constraintLayout.setSelected(false);
constraintLayout3.setSelected(false);
constraintLayout4.setSelected(false);
} }
}); });
constraintLayout3.setOnClickListener(new View.OnClickListener() { constraintLayout3.setOnClickListener(new View.OnClickListener() {
@ -75,6 +83,10 @@ public class MainFragment extends Fragment {
getActivity().getSupportFragmentManager().beginTransaction() getActivity().getSupportFragmentManager().beginTransaction()
.show(mainmajorFragment).hide(maingoodFragment).hide(mainexpertFragment).hide(mainhomeFragment) .show(mainmajorFragment).hide(maingoodFragment).hide(mainexpertFragment).hide(mainhomeFragment)
.commit(); .commit();
constraintLayout3.setSelected(true);
constraintLayout2.setSelected(false);
constraintLayout.setSelected(false);
constraintLayout4.setSelected(false);
} }
}); });
@ -86,6 +98,10 @@ public class MainFragment extends Fragment {
getActivity().getSupportFragmentManager().beginTransaction() getActivity().getSupportFragmentManager().beginTransaction()
.show(mainexpertFragment).hide(maingoodFragment).hide(mainhomeFragment).hide(mainmajorFragment) .show(mainexpertFragment).hide(maingoodFragment).hide(mainhomeFragment).hide(mainmajorFragment)
.commit(); .commit();
constraintLayout4.setSelected(true);
constraintLayout2.setSelected(false);
constraintLayout3.setSelected(false);
constraintLayout.setSelected(false);
} }
}); });
// Inflate the layout for this fragment // Inflate the layout for this fragment

View File

@ -21,6 +21,7 @@ import com.youth.banner.indicator.CircleIndicator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
import retrofit2.Call; import retrofit2.Call;
@ -73,7 +74,7 @@ public class MainexpertFragment extends Fragment {
R.drawable.img_21, R.drawable.img_21,
R.drawable.img_22 R.drawable.img_22
); );
Collections.shuffle(imageList);
recyclerView3 = view.findViewById(R.id.RecyclerView3); recyclerView3 = view.findViewById(R.id.RecyclerView3);
myAdpater3 = new MyAdpater3(); myAdpater3 = new MyAdpater3();
recyclerView3.setAdapter(myAdpater3); recyclerView3.setAdapter(myAdpater3);
@ -92,7 +93,9 @@ public class MainexpertFragment extends Fragment {
if (data.id < 7) { if (data.id < 7) {
expert1List.add(data); expert1List.add(data);
} }
} }
Collections.shuffle(expert1List);
myAdpater.notifyDataSetChanged(); myAdpater.notifyDataSetChanged();
} }
@ -117,6 +120,7 @@ public class MainexpertFragment extends Fragment {
expert2List.add(data); expert2List.add(data);
} }
} }
Collections.shuffle(expert2List);
myAdpater2.notifyDataSetChanged(); myAdpater2.notifyDataSetChanged();
} }

View File

@ -22,6 +22,7 @@ import com.youth.banner.holder.BannerImageHolder;
import com.youth.banner.indicator.CircleIndicator; import com.youth.banner.indicator.CircleIndicator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import retrofit2.Call; import retrofit2.Call;
@ -110,7 +111,9 @@ public class MainhomeFragment extends Fragment {
class_homelist2.add(data); class_homelist2.add(data);
} }
} }
Collections.shuffle(class_homelist0);
Collections.shuffle(class_homelist1);
Collections.shuffle(class_homelist2);
myAdpater.notifyDataSetChanged(); myAdpater.notifyDataSetChanged();
recyclerView2.getAdapter().notifyDataSetChanged(); recyclerView2.getAdapter().notifyDataSetChanged();
recyclerView3.getAdapter().notifyDataSetChanged(); recyclerView3.getAdapter().notifyDataSetChanged();
@ -134,6 +137,7 @@ public class MainhomeFragment extends Fragment {
class2_homelist.add(data); class2_homelist.add(data);
} }
} }
Collections.shuffle(class2_homelist);
myAdpater2.notifyDataSetChanged(); myAdpater2.notifyDataSetChanged();
} }

View File

@ -16,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import retrofit2.Call; import retrofit2.Call;
@ -48,6 +49,7 @@ public class MainmajorFragment extends Fragment {
if(people.data.get(0).id<5){ if(people.data.get(0).id<5){
peopleList.addAll(people.data); peopleList.addAll(people.data);
} }
Collections.shuffle(peopleList);
myAdpater.notifyDataSetChanged(); myAdpater.notifyDataSetChanged();
} }
@ -65,6 +67,7 @@ public class MainmajorFragment extends Fragment {
public void onResponse(Call<Advertisement> call2, Response<Advertisement> response) { public void onResponse(Call<Advertisement> call2, Response<Advertisement> response) {
Advertisement advertisement = response.body(); Advertisement advertisement = response.body();
advertiselist.addAll(advertisement.data); advertiselist.addAll(advertisement.data);
Collections.shuffle(advertiselist);
myAdpater2.notifyDataSetChanged(); myAdpater2.notifyDataSetChanged();
} }

View File

@ -18,6 +18,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import retrofit2.Call; import retrofit2.Call;
@ -28,6 +29,7 @@ public class Study_pinglun extends Fragment {
RecyclerView recyclerView; RecyclerView recyclerView;
MyAdpater myAdpater; MyAdpater myAdpater;
List<User.DataDTO> userList = new ArrayList<>(); List<User.DataDTO> userList = new ArrayList<>();
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
@ -58,7 +60,7 @@ public class Study_pinglun extends Fragment {
} }
}); });
userApi userApi = RetrofitUtils.getRetrofit("https://dev.usemock.com/664ac0559e857b0cdafce629/").create(userApi.class); UserApi userApi = RetrofitUtils.getRetrofit("https://dev.usemock.com/664ac0559e857b0cdafce629/").create(UserApi.class);
for(int i=1;i<8;i++){ for(int i=1;i<8;i++){
Call<User> call = userApi.Comment(i); Call<User> call = userApi.Comment(i);
call.enqueue(new Callback<User>() { call.enqueue(new Callback<User>() {
@ -66,6 +68,7 @@ public class Study_pinglun extends Fragment {
public void onResponse(Call<User> call, Response<User> response) { public void onResponse(Call<User> call, Response<User> response) {
User user = response.body(); User user = response.body();
userList.addAll(user.data); userList.addAll(user.data);
Collections.shuffle(userList);
myAdpater.notifyDataSetChanged(); myAdpater.notifyDataSetChanged();
} }

View File

@ -12,6 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
public class TypeFragment extends Fragment implements AdapterView.OnItemClickListener { public class TypeFragment extends Fragment implements AdapterView.OnItemClickListener {

View File

@ -3,12 +3,9 @@ package com.example.liyueling_final;
import retrofit2.Call; import retrofit2.Call;
import retrofit2.http.Field; import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded; import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST; import retrofit2.http.POST;
import retrofit2.http.Query;
public interface userApi { public interface UserApi {
@FormUrlEncoded @FormUrlEncoded
@POST("comment") @POST("comment")
Call<User> Comment (@Field("id") Integer id); Call<User> Comment (@Field("id") Integer id);

View File

@ -36,6 +36,7 @@ import org.greenrobot.eventbus.ThreadMode;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import retrofit2.Call; import retrofit2.Call;
@ -169,6 +170,7 @@ public class UserFragment extends Fragment {
public void onResponse(Call<Chat> call, Response<Chat> response) { public void onResponse(Call<Chat> call, Response<Chat> response) {
Chat chat = response.body(); Chat chat = response.body();
chatlist.addAll(chat.data); chatlist.addAll(chat.data);
Collections.shuffle(chatlist);
myAdpater.notifyDataSetChanged(); myAdpater.notifyDataSetChanged();
} }

View File

@ -11,7 +11,12 @@ import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
public class welcome extends AppCompatActivity { import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
public class Welcome extends AppCompatActivity {
TextView textView; TextView textView;
ImageView imageView; ImageView imageView;
ImageView imageView2; ImageView imageView2;
@ -25,6 +30,10 @@ public class welcome extends AppCompatActivity {
imageView = findViewById(R.id.imgx); imageView = findViewById(R.id.imgx);
imageView2 = findViewById(R.id.enter); imageView2 = findViewById(R.id.enter);
imageView3 = findViewById(R.id.imageView143); imageView3 = findViewById(R.id.imageView143);
Glide.with(Welcome.this)
.load(R.drawable.img_117)
.apply(new RequestOptions().transform(new RoundedCorners(90)))
.into(imageView);
PropertyValuesHolder propertyValuesHolder = PropertyValuesHolder.ofFloat("translationY",-100,0); PropertyValuesHolder propertyValuesHolder = PropertyValuesHolder.ofFloat("translationY",-100,0);
PropertyValuesHolder propertyValuesHolder3 = PropertyValuesHolder.ofFloat("alpha",0,1); PropertyValuesHolder propertyValuesHolder3 = PropertyValuesHolder.ofFloat("alpha",0,1);
@ -50,7 +59,7 @@ public class welcome extends AppCompatActivity {
animator.start(); animator.start();
Intent intent = new Intent(welcome.this, LoginMainActivity.class); Intent intent = new Intent(Welcome.this, LoginMainActivity.class);
startActivity(intent); startActivity(intent);
} }
}); });

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/text_select" android:state_selected="true"/>
<item android:color="@color/text_unselect" android:state_selected="false"/>
</selector>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/white" />
</shape>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/black" /> <solid android:color="@color/selected_button_background_color"/>
<corners android:radius="8dp"/>
</shape> </shape>

View File

@ -0,0 +1,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/unselected_button_background_color"/>
<corners android:radius="8dp"/>
</shape>

View File

@ -65,10 +65,11 @@
android:id="@+id/button1" android:id="@+id/button1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:background="@drawable/selected_button_background"
android:text="问题" android:text="问题"
android:background="@android:color/white" android:textColor="@color/selected_button_text_color"
android:textColor="@android:color/black"
app:layout_constraintStart_toStartOf="@+id/textView27" app:layout_constraintStart_toStartOf="@+id/textView27"
app:layout_constraintTop_toBottomOf="@+id/textView27" /> app:layout_constraintTop_toBottomOf="@+id/textView27" />
@ -76,10 +77,12 @@
android:id="@+id/button2" android:id="@+id/button2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/button1"
android:layout_centerHorizontal="true"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:background="@android:color/black" android:background="@drawable/unselected_button_background"
android:text="建议" android:text="建议"
android:textColor="@android:color/white" android:textColor="@color/unselected_button_text_color"
app:layout_constraintBottom_toBottomOf="@+id/button1" app:layout_constraintBottom_toBottomOf="@+id/button1"
app:layout_constraintStart_toEndOf="@+id/button1" app:layout_constraintStart_toEndOf="@+id/button1"
app:layout_constraintTop_toTopOf="@+id/button1" /> app:layout_constraintTop_toTopOf="@+id/button1" />

View File

@ -45,7 +45,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/img_5" /> app:srcCompat="@drawable/mainhome" />
<TextView <TextView
android:id="@+id/textView4" android:id="@+id/textView4"
@ -55,6 +55,7 @@
android:layout_marginEnd="25dp" android:layout_marginEnd="25dp"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:text="首页" android:text="首页"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
@ -79,7 +80,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/img_3" /> app:srcCompat="@drawable/study" />
<TextView <TextView
android:id="@+id/className" android:id="@+id/className"
@ -87,6 +88,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:text="我的学习" android:text="我的学习"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
@ -111,7 +113,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/img_2" /> app:srcCompat="@drawable/user" />
<TextView <TextView
android:id="@+id/namex" android:id="@+id/namex"
@ -119,6 +121,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:text="账号" android:text="账号"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
@ -143,7 +146,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/img_4" /> app:srcCompat="@drawable/type" />
<TextView <TextView
android:id="@+id/time" android:id="@+id/time"
@ -151,6 +154,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:text="分类" android:text="分类"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".welcome"> tools:context=".Welcome">
<ImageView <ImageView
android:id="@+id/imageView143" android:id="@+id/imageView143"

View File

@ -83,6 +83,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="个性推荐" android:text="个性推荐"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -104,6 +105,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="精品课" android:text="精品课"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -125,6 +127,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="微专业" android:text="微专业"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -146,6 +149,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="行家" android:text="行家"
android:textColor="@color/text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -3,6 +3,12 @@
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="bule">#56AAFF</color> <color name="bule">#56AAFF</color>
<color name="default_text_color">#000000</color> <color name="selected_button_background_color">#000000</color> <!-- 选中状态的背景颜色 -->
<color name="selected_text_color">#FFFFFF</color> <color name="unselected_button_background_color">#FFFFFF</color> <!-- 非选中状态的背景颜色 -->
<color name="text_select">#000000</color>
<color name="text_unselect">#94959D</color>
<!-- 按钮文本颜色 -->
<color name="selected_button_text_color">#FFFFFF</color> <!-- 选中状态的文本颜色 -->
<color name="unselected_button_text_color">#000000</color> <!-- 非选中状态的文本颜色 -->
</resources> </resources>

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Base.Theme.Liyueling" parent="Theme.Material3.DayNight.NoActionBar"> <style name="Base.Theme.Liyueling" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
<!-- Customize your light theme here. --> <!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> --> <!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style> </style>