UI的编写
|
|
@ -41,8 +41,13 @@ dependencies {
|
||||||
implementation("androidx.core:core:1.12.0")
|
implementation("androidx.core:core:1.12.0")
|
||||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
implementation("com.google.android.material:material:1.11.0")
|
implementation("com.google.android.material:material:1.11.0")
|
||||||
|
implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0")
|
||||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
||||||
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
|
|
||||||
|
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||||
|
annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
|
||||||
|
|
||||||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,22 @@
|
||||||
android:theme="@style/Theme.LiveStreaming"
|
android:theme="@style/Theme.LiveStreaming"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.example.livestreaming.FishPondActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.example.livestreaming.ProfileActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.example.livestreaming.WishTreeActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.example.livestreaming.MessagesActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.example.livestreaming.PlayerActivity"
|
android:name="com.example.livestreaming.PlayerActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
|
||||||
1
android-app/app/src/main/assets/img/.keep
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.example.livestreaming;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.example.livestreaming.databinding.ActivityFishPondBinding;
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
|
public class FishPondActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private ActivityFishPondBinding binding;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
binding = ActivityFishPondBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
BottomNavigationView bottomNavigation = binding.bottomNavInclude.bottomNavigation;
|
||||||
|
bottomNavigation.setSelectedItemId(R.id.nav_friends);
|
||||||
|
bottomNavigation.setOnItemSelectedListener(item -> {
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == R.id.nav_home) {
|
||||||
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_wish_tree) {
|
||||||
|
WishTreeActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_messages) {
|
||||||
|
MessagesActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_profile) {
|
||||||
|
ProfileActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (binding != null) {
|
||||||
|
binding.bottomNavInclude.bottomNavigation.setSelectedItemId(R.id.nav_friends);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.example.livestreaming;
|
package com.example.livestreaming;
|
||||||
|
|
||||||
|
import android.content.res.AssetManager;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
@ -11,17 +12,23 @@ import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
|
||||||
import com.example.livestreaming.databinding.ActivityMainBinding;
|
import com.example.livestreaming.databinding.ActivityMainBinding;
|
||||||
import com.example.livestreaming.databinding.DialogCreateRoomBinding;
|
import com.example.livestreaming.databinding.DialogCreateRoomBinding;
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
import com.example.livestreaming.net.ApiClient;
|
import com.example.livestreaming.net.ApiClient;
|
||||||
import com.example.livestreaming.net.ApiResponse;
|
import com.example.livestreaming.net.ApiResponse;
|
||||||
import com.example.livestreaming.net.CreateRoomRequest;
|
import com.example.livestreaming.net.CreateRoomRequest;
|
||||||
import com.example.livestreaming.net.Room;
|
import com.example.livestreaming.net.Room;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -37,6 +44,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
private final Handler handler = new Handler(Looper.getMainLooper());
|
private final Handler handler = new Handler(Looper.getMainLooper());
|
||||||
private Runnable pollRunnable;
|
private Runnable pollRunnable;
|
||||||
|
|
||||||
|
private boolean isFetching;
|
||||||
|
private long lastFetchMs;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
@ -50,10 +60,79 @@ public class MainActivity extends AppCompatActivity {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
});
|
});
|
||||||
|
|
||||||
binding.roomsRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
StaggeredGridLayoutManager glm = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
||||||
|
glm.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS);
|
||||||
|
binding.roomsRecyclerView.setLayoutManager(glm);
|
||||||
binding.roomsRecyclerView.setAdapter(adapter);
|
binding.roomsRecyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
binding.startLiveButton.setOnClickListener(v -> showCreateRoomDialog());
|
loadCoverAssets();
|
||||||
|
|
||||||
|
binding.swipeRefresh.setOnRefreshListener(this::fetchRooms);
|
||||||
|
|
||||||
|
binding.roomsRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
|
if (dy <= 0) return;
|
||||||
|
RecyclerView.LayoutManager lm = recyclerView.getLayoutManager();
|
||||||
|
if (!(lm instanceof StaggeredGridLayoutManager)) return;
|
||||||
|
StaggeredGridLayoutManager sglm = (StaggeredGridLayoutManager) lm;
|
||||||
|
int total = sglm.getItemCount();
|
||||||
|
int[] last = sglm.findLastVisibleItemPositions(null);
|
||||||
|
int lastVisible = -1;
|
||||||
|
if (last != null) {
|
||||||
|
for (int v : last) {
|
||||||
|
if (v > lastVisible) lastVisible = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (total <= 0) return;
|
||||||
|
|
||||||
|
if (lastVisible >= total - 4) {
|
||||||
|
long now = System.currentTimeMillis();
|
||||||
|
if (!isFetching && now - lastFetchMs > 1500) {
|
||||||
|
fetchRooms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
BottomNavigationView bottomNavigation = binding.bottomNavInclude.bottomNavigation;
|
||||||
|
bottomNavigation.setSelectedItemId(R.id.nav_home);
|
||||||
|
bottomNavigation.setOnItemSelectedListener(item -> {
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == R.id.nav_home) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_friends) {
|
||||||
|
startActivity(new Intent(this, FishPondActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_wish_tree) {
|
||||||
|
WishTreeActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_messages) {
|
||||||
|
MessagesActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_profile) {
|
||||||
|
ProfileActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (binding != null) {
|
||||||
|
BottomNavigationView bottomNavigation = binding.bottomNavInclude.bottomNavigation;
|
||||||
|
bottomNavigation.setSelectedItemId(R.id.nav_home);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -200,22 +279,64 @@ public class MainActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fetchRooms() {
|
private void fetchRooms() {
|
||||||
|
isFetching = true;
|
||||||
|
lastFetchMs = System.currentTimeMillis();
|
||||||
binding.loading.setVisibility(View.VISIBLE);
|
binding.loading.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
ApiClient.getService().getRooms().enqueue(new Callback<ApiResponse<List<Room>>>() {
|
ApiClient.getService().getRooms().enqueue(new Callback<ApiResponse<List<Room>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ApiResponse<List<Room>>> call, Response<ApiResponse<List<Room>>> response) {
|
public void onResponse(Call<ApiResponse<List<Room>>> call, Response<ApiResponse<List<Room>>> response) {
|
||||||
binding.loading.setVisibility(View.GONE);
|
binding.loading.setVisibility(View.GONE);
|
||||||
|
binding.swipeRefresh.setRefreshing(false);
|
||||||
|
isFetching = false;
|
||||||
ApiResponse<List<Room>> body = response.body();
|
ApiResponse<List<Room>> body = response.body();
|
||||||
List<Room> rooms = body != null && body.getData() != null ? body.getData() : Collections.emptyList();
|
List<Room> rooms = body != null && body.getData() != null ? body.getData() : Collections.emptyList();
|
||||||
|
if (rooms == null || rooms.isEmpty()) {
|
||||||
|
rooms = buildDemoRooms(12);
|
||||||
|
}
|
||||||
adapter.submitList(rooms);
|
adapter.submitList(rooms);
|
||||||
|
adapter.bumpCoverOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ApiResponse<List<Room>>> call, Throwable t) {
|
public void onFailure(Call<ApiResponse<List<Room>>> call, Throwable t) {
|
||||||
binding.loading.setVisibility(View.GONE);
|
binding.loading.setVisibility(View.GONE);
|
||||||
adapter.submitList(Collections.emptyList());
|
binding.swipeRefresh.setRefreshing(false);
|
||||||
|
isFetching = false;
|
||||||
|
adapter.submitList(buildDemoRooms(12));
|
||||||
|
adapter.bumpCoverOffset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Room> buildDemoRooms(int count) {
|
||||||
|
List<Room> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
String id = "demo-" + i;
|
||||||
|
String title = "王者荣耀陪练" + (i + 1);
|
||||||
|
String streamer = "虚拟主播" + (i + 1);
|
||||||
|
boolean live = i % 3 != 0;
|
||||||
|
list.add(new Room(id, title, streamer, live));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadCoverAssets() {
|
||||||
|
AssetManager am = getAssets();
|
||||||
|
List<String> files = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
String[] list = am.list("img");
|
||||||
|
if (list != null) {
|
||||||
|
for (String f : list) {
|
||||||
|
if (f == null) continue;
|
||||||
|
String lower = f.toLowerCase();
|
||||||
|
if (lower.endsWith(".png") || lower.endsWith(".jpg") || lower.endsWith(".jpeg") || lower.endsWith(".webp") || lower.endsWith(".gif")) {
|
||||||
|
files.add(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (IOException ignored) {
|
||||||
|
}
|
||||||
|
adapter.setCoverAssetFiles(files);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
package com.example.livestreaming
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.example.livestreaming;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.example.livestreaming.databinding.ActivityMessagesBinding;
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
|
public class MessagesActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private ActivityMessagesBinding binding;
|
||||||
|
|
||||||
|
public static void start(Context context) {
|
||||||
|
Intent intent = new Intent(context, MessagesActivity.class);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
binding = ActivityMessagesBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
BottomNavigationView bottomNavigation = binding.bottomNavInclude.bottomNavigation;
|
||||||
|
bottomNavigation.setSelectedItemId(R.id.nav_messages);
|
||||||
|
bottomNavigation.setOnItemSelectedListener(item -> {
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == R.id.nav_messages) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_home) {
|
||||||
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_friends) {
|
||||||
|
startActivity(new Intent(this, FishPondActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_wish_tree) {
|
||||||
|
WishTreeActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_profile) {
|
||||||
|
ProfileActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (binding != null) {
|
||||||
|
binding.bottomNavInclude.bottomNavigation.setSelectedItemId(R.id.nav_messages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
package com.example.livestreaming
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.example.livestreaming;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.example.livestreaming.databinding.ActivityProfileBinding;
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
|
public class ProfileActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private ActivityProfileBinding binding;
|
||||||
|
|
||||||
|
public static void start(Context context) {
|
||||||
|
Intent intent = new Intent(context, ProfileActivity.class);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
binding = ActivityProfileBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
BottomNavigationView bottomNavigation = binding.bottomNavInclude.bottomNavigation;
|
||||||
|
bottomNavigation.setSelectedItemId(R.id.nav_profile);
|
||||||
|
bottomNavigation.setOnItemSelectedListener(item -> {
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == R.id.nav_home) {
|
||||||
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_friends) {
|
||||||
|
startActivity(new Intent(this, FishPondActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_wish_tree) {
|
||||||
|
WishTreeActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_messages) {
|
||||||
|
MessagesActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (binding != null) {
|
||||||
|
binding.bottomNavInclude.bottomNavigation.setSelectedItemId(R.id.nav_profile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,14 +5,19 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.DiffUtil;
|
import androidx.recyclerview.widget.DiffUtil;
|
||||||
import androidx.recyclerview.widget.ListAdapter;
|
import androidx.recyclerview.widget.ListAdapter;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
import com.example.livestreaming.databinding.ItemRoomBinding;
|
import com.example.livestreaming.databinding.ItemRoomBinding;
|
||||||
import com.example.livestreaming.net.Room;
|
import com.example.livestreaming.net.Room;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class RoomsAdapter extends ListAdapter<Room, RoomsAdapter.RoomVH> {
|
public class RoomsAdapter extends ListAdapter<Room, RoomsAdapter.RoomVH> {
|
||||||
|
|
||||||
public interface OnRoomClickListener {
|
public interface OnRoomClickListener {
|
||||||
|
|
@ -21,11 +26,25 @@ public class RoomsAdapter extends ListAdapter<Room, RoomsAdapter.RoomVH> {
|
||||||
|
|
||||||
private final OnRoomClickListener onRoomClick;
|
private final OnRoomClickListener onRoomClick;
|
||||||
|
|
||||||
|
private final List<String> coverAssetFiles = new ArrayList<>();
|
||||||
|
private int coverOffset;
|
||||||
|
|
||||||
public RoomsAdapter(OnRoomClickListener onRoomClick) {
|
public RoomsAdapter(OnRoomClickListener onRoomClick) {
|
||||||
super(DIFF);
|
super(DIFF);
|
||||||
this.onRoomClick = onRoomClick;
|
this.onRoomClick = onRoomClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCoverAssetFiles(List<String> files) {
|
||||||
|
coverAssetFiles.clear();
|
||||||
|
if (files != null) coverAssetFiles.addAll(files);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bumpCoverOffset() {
|
||||||
|
coverOffset++;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public RoomVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public RoomVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
@ -53,6 +72,64 @@ public class RoomsAdapter extends ListAdapter<Room, RoomsAdapter.RoomVH> {
|
||||||
binding.roomTitle.setText(room != null && room.getTitle() != null ? room.getTitle() : "(Untitled)");
|
binding.roomTitle.setText(room != null && room.getTitle() != null ? room.getTitle() : "(Untitled)");
|
||||||
binding.streamerName.setText(room != null && room.getStreamerName() != null ? room.getStreamerName() : "");
|
binding.streamerName.setText(room != null && room.getStreamerName() != null ? room.getStreamerName() : "");
|
||||||
|
|
||||||
|
try {
|
||||||
|
String seed = room != null && room.getId() != null ? room.getId() : String.valueOf(getBindingAdapterPosition());
|
||||||
|
int h = Math.abs(seed.hashCode());
|
||||||
|
int likes = (h % 980) + 20;
|
||||||
|
binding.likeCount.setText(String.valueOf(likes));
|
||||||
|
binding.likeIcon.setVisibility(View.VISIBLE);
|
||||||
|
binding.likeCount.setVisibility(View.VISIBLE);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
String seed = room != null && room.getId() != null ? room.getId() : String.valueOf(getBindingAdapterPosition());
|
||||||
|
int h = Math.abs(seed.hashCode());
|
||||||
|
int mode = h % 3;
|
||||||
|
String ratio;
|
||||||
|
if (mode == 0) {
|
||||||
|
ratio = "H,3:4";
|
||||||
|
} else if (mode == 1) {
|
||||||
|
ratio = "H,4:3";
|
||||||
|
} else {
|
||||||
|
ratio = "H,1:1";
|
||||||
|
}
|
||||||
|
ViewGroup.LayoutParams lp = binding.coverImage.getLayoutParams();
|
||||||
|
if (lp instanceof ConstraintLayout.LayoutParams) {
|
||||||
|
ConstraintLayout.LayoutParams clp = (ConstraintLayout.LayoutParams) lp;
|
||||||
|
if (clp.dimensionRatio == null || !clp.dimensionRatio.equals(ratio)) {
|
||||||
|
clp.dimensionRatio = ratio;
|
||||||
|
binding.coverImage.setLayoutParams(clp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
|
RoomsAdapter a = (RoomsAdapter) getBindingAdapter();
|
||||||
|
String assetFile = null;
|
||||||
|
if (a != null && !a.coverAssetFiles.isEmpty()) {
|
||||||
|
int pos = getBindingAdapterPosition();
|
||||||
|
if (pos < 0) pos = 0;
|
||||||
|
int idx = Math.abs(pos + a.coverOffset) % a.coverAssetFiles.size();
|
||||||
|
assetFile = a.coverAssetFiles.get(idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
Object model;
|
||||||
|
if (assetFile != null) {
|
||||||
|
model = "file:///android_asset/img/" + assetFile;
|
||||||
|
} else {
|
||||||
|
String seed = room != null && room.getId() != null ? room.getId() : String.valueOf(getBindingAdapterPosition());
|
||||||
|
int h = Math.abs(seed.hashCode());
|
||||||
|
int imageId = (h % 1000) + 1;
|
||||||
|
model = "https://picsum.photos/id/" + imageId + "/600/450";
|
||||||
|
}
|
||||||
|
|
||||||
|
Glide.with(binding.coverImage)
|
||||||
|
.load(model)
|
||||||
|
.placeholder(R.drawable.bg_cover_placeholder)
|
||||||
|
.centerCrop()
|
||||||
|
.into(binding.coverImage);
|
||||||
|
|
||||||
if (room != null && room.isLive()) {
|
if (room != null && room.isLive()) {
|
||||||
binding.liveBadge.setVisibility(View.VISIBLE);
|
binding.liveBadge.setVisibility(View.VISIBLE);
|
||||||
binding.liveBadge.setBackgroundColor(ContextCompat.getColor(binding.getRoot().getContext(), R.color.live_red));
|
binding.liveBadge.setBackgroundColor(ContextCompat.getColor(binding.getRoot().getContext(), R.color.live_red));
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
package com.example.livestreaming
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.example.livestreaming;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.example.livestreaming.databinding.ActivityWishTreeBinding;
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
|
public class WishTreeActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private ActivityWishTreeBinding binding;
|
||||||
|
|
||||||
|
public static void start(Context context) {
|
||||||
|
Intent intent = new Intent(context, WishTreeActivity.class);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
binding = ActivityWishTreeBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
BottomNavigationView bottomNavigation = binding.bottomNavInclude.bottomNavigation;
|
||||||
|
bottomNavigation.setSelectedItemId(R.id.nav_wish_tree);
|
||||||
|
bottomNavigation.setOnItemSelectedListener(item -> {
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == R.id.nav_wish_tree) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_home) {
|
||||||
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_friends) {
|
||||||
|
startActivity(new Intent(this, FishPondActivity.class));
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_messages) {
|
||||||
|
MessagesActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (id == R.id.nav_profile) {
|
||||||
|
ProfileActivity.start(this);
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (binding != null) {
|
||||||
|
binding.bottomNavInclude.bottomNavigation.setSelectedItemId(R.id.nav_wish_tree);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,40 @@ public class Room {
|
||||||
@SerializedName("streamUrls")
|
@SerializedName("streamUrls")
|
||||||
private StreamUrls streamUrls;
|
private StreamUrls streamUrls;
|
||||||
|
|
||||||
|
public Room() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Room(String id, String title, String streamerName, boolean isLive) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
this.streamerName = streamerName;
|
||||||
|
this.isLive = isLive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreamerName(String streamerName) {
|
||||||
|
this.streamerName = streamerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLive(boolean live) {
|
||||||
|
isLive = live;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreamKey(String streamKey) {
|
||||||
|
this.streamKey = streamKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreamUrls(StreamUrls streamUrls) {
|
||||||
|
this.streamUrls = streamUrls;
|
||||||
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="@color/purple_500" android:state_checked="true" />
|
||||||
|
<item android:color="#8A8A8A" />
|
||||||
|
</selector>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#111111" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_avatar_ring.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#00000000" />
|
||||||
|
<stroke android:width="4dp" android:color="#FFFFFFFF" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_chip_purple.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#B28AE6" />
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_chip_yellow.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#FFE08A" />
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#99FFFFFF" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#E9ECEF" />
|
||||||
|
</shape>
|
||||||
13
android-app/app/src/main/res/drawable/bg_diamond_rounded.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fromDegrees="45"
|
||||||
|
android:toDegrees="45"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%">
|
||||||
|
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#E6FFFFFF" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
</rotate>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="270"
|
||||||
|
android:startColor="#6E5AA6"
|
||||||
|
android:centerColor="#B28AE6"
|
||||||
|
android:endColor="#D8C9FF" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_gray_12.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#F2F3F5" />
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_orbit_ring.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#00FFFFFF" />
|
||||||
|
<stroke android:width="2dp" android:color="#55FFFFFF" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_pill_left.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#66FFFFFF" />
|
||||||
|
<corners android:radius="22dp" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_pill_right.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#66FFFFFF" />
|
||||||
|
<corners android:radius="22dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="0"
|
||||||
|
android:startColor="#D8C9FF"
|
||||||
|
android:centerColor="#EEE8FF"
|
||||||
|
android:endColor="#F7F5FF" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_purple_20.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#7C4DFF" />
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#7C4DFF" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_search.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#F2F3F5" />
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
||||||
5
android-app/app/src/main/res/drawable/bg_white_16.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#FFFFFF" />
|
||||||
|
<corners android:radius="16dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#FFFFFF" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#222222"
|
||||||
|
android:pathData="M12,2a10,10 0,1 0,10 10A10,10 0,0 0,12 2zm0,4a4,4 0,1 1,-4 4a4,4 0,0 1,4 -4zm0,14c-2.67,0 -5.03,-1.16 -6.67,-3a8,8 0,0 1,13.34 0c-1.64,1.84 -4,3 -6.67,3z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_add_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:pathData="M19,13H13v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_bottle_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#009688"
|
||||||
|
android:pathData="M10,2h4v3h-1v3.1l4.2,6.3c0.52,0.78 0.8,1.69 0.8,2.63V20a2,2 0,0 1,-2 2H8a2,2 0,0 1,-2 -2v-2.97c0,-0.94 0.28,-1.85 0.8,-2.63L11,8.1V5h-1V2zm1.5,9L8.3,15.8c-0.3,0.45 -0.3,0.99 -0.3,1.23V20h8v-2.97c0,-0.24 0,-0.78 -0.3,-1.23L12.5,11h-1z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_chat_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M4,4h16v12H7l-3,3V4zm3,5h10v2H7V9zm0,-3h10v2H7V6zm0,6h6v2H7v-2z" />
|
||||||
|
</vector>
|
||||||
14
android-app/app/src/main/res/drawable/ic_copy_24.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M16,1H6C4.9,1 4,1.9 4,3v12h2V3h10V1z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M18,5H10C8.9,5 8,5.9 8,7v14c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7c0,-1.1 -0.9,-2 -2,-2zM18,21H10V7h8v14z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_crosshair_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF5722"
|
||||||
|
android:pathData="M11,2h2v3h-2V2zm0,17h2v3h-2v-3zM2,11h3v2H2v-2zm17,0h3v2h-3v-2zM12,7a5,5 0,1 0,0 10a5,5 0,0 0,0 -10zm0,2a3,3 0,1 1,0 6a3,3 0,0 1,0 -6z" />
|
||||||
|
</vector>
|
||||||
14
android-app/app/src/main/res/drawable/ic_crown_16.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF6D35D"
|
||||||
|
android:pathData="M5,18h14l1,-10 -4.5,3 -3.5,-6 -3.5,6L4,8l1,10z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF6D35D"
|
||||||
|
android:pathData="M6,20c0,-0.6 0.4,-1 1,-1h10c0.6,0 1,0.4 1,1v1H6v-1z" />
|
||||||
|
</vector>
|
||||||
22
android-app/app/src/main/res/drawable/ic_fullscreen_24.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M7,14H5v5h5v-2H7v-3z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M19,19h-5v-2h3v-3h2v5z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M19,10h-2V7h-3V5h5v5z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M10,5v2H7v3H5V5h5z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_game_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF4D6D"
|
||||||
|
android:pathData="M7,9h3V7h2v2h3v2h-3v3h-2v-3H7V9zm10,0h2v2h-2V9zM5,6h14a2,2 0,0 1,2 2v8a2,2 0,0 1,-2 2H5a2,2 0,0 1,-2 -2V8a2,2 0,0 1,2 -2z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_grid_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M3,3h8v8H3V3zm10,0h8v8h-8V3zM3,13h8v8H3v-8zm10,0h8v8h-8v-8z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_heart_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#E91E63"
|
||||||
|
android:pathData="M12,21s-7.05,-4.35 -9.33,-8.36C0.86,9.26 2.1,6.2 4.9,5.2c1.6,-0.6 3.4,-0.18 4.6,1.02L12,8.7l2.5,-2.48c1.2,-1.2 3,-1.62 4.6,-1.02c2.8,1 4.04,4.06 2.23,7.44C19.05,16.65 12,21 12,21z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_home_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M12,3l9,8h-3v10h-5v-6H11v6H6V11H3l9,-8z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_ktv_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#2196F3"
|
||||||
|
android:pathData="M12,14a3,3 0,0 0,3 -3V5a3,3 0,0 0,-6 0v6a3,3 0,0 0,3 3zm5,-3a5,5 0,0 1,-10 0H5a7,7 0,0 0,6 6.92V21h2v-3.08A7,7 0,0 0,19 11h-2z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_male_16.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF6F6AFF"
|
||||||
|
android:pathData="M15,2h7v7h-2V5.41l-4.24,4.24a7,7 0,1 1,-1.41 -1.41L18.59,4H15V2zM10,9a5,5 0,1 0,0 10a5,5 0,0 0,0 -10z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_menu_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#222222"
|
||||||
|
android:pathData="M3,6h18v2H3V6zm0,5h18v2H3v-2zm0,5h18v2H3v-2z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_mic_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M12,14a3,3 0,0 0,3 -3V5a3,3 0,0 0,-6 0v6a3,3 0,0 0,3 3zm5,-3a5,5 0,0 1,-10 0H5a7,7 0,0 0,6 6.92V21h2v-3.08A7,7 0,0 0,19 11h-2z" />
|
||||||
|
</vector>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#222222"
|
||||||
|
android:pathData="M12,22a2,2 0,0 0,2 -2h-4a2,2 0,0 0,2 2zM18,16v-5a6,6 0,0 0,-5 -5.91V4a1,1 0,0 0,-2 0v1.09A6,6 0,0 0,6 11v5l-2,2v1h16v-1l-2,-2z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_palette_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3F51B5"
|
||||||
|
android:pathData="M12,3C7.03,3 3,6.58 3,11c0,2.39 1.18,4.53 3.05,6.05C7.8,18.53 9,20 10.5,20H12c1.66,0 3,-1.34 3,-3c0,-0.83 -0.34,-1.58 -0.88,-2.12C14.58,14.34 15.33,14 16.16,14H18c1.66,0 3,-1.34 3,-3c0,-4.42 -4.03,-8 -9,-8z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_people_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M16,11c1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3s-3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 3,-1.34 3,-3S9.66,5 8,5S5,6.34 5,8s1.34,3 3,3zM8,13c-2.67,0 -8,1.34 -8,4v2h10v-2c0,-1.48 0.83,-2.77 2.05,-3.63C10.87,13.14 9.47,13 8,13zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05C16.82,14.13 18,15.42 18,17v2h6v-2c0,-2.66 -5.33,-4 -8,-4z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_person_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M12,12a4,4 0,1 0,-4 -4a4,4 0,0 0,4 4zm0,2c-4.42,0 -8,2.24 -8,5v1h16v-1c0,-2.76 -3.58,-5 -8,-5z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_search_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M15.5,14h-0.79l-0.28,-0.27A6.47,6.47 0,0 0,16 9.5A6.5,6.5 0,1 0,9.5 16a6.47,6.47 0,0 0,4.23 -1.57l0.27,0.28v0.79L20,21.5L21.5,20L15.5,14zM9.5,14A4.5,4.5 0,1 1,14 9.5A4.5,4.5 0,0 1,9.5 14z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_tree_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#777777"
|
||||||
|
android:pathData="M12,2c-2.21,0 -4,1.79 -4,4c0,0.89 0.29,1.71 0.79,2.38C6.63,8.93 5,10.83 5,13c0,2.76 2.24,5 5,5h1v3h2v-3h1c2.76,0 5,-2.24 5,-5c0,-2.17 -1.63,-4.07 -3.79,-4.62C15.71,7.71 16,6.89 16,6c0,-2.21 -1.79,-4 -4,-4zm-2,6h4c1.66,0 3,1.34 3,3c0,1.66 -1.34,3 -3,3h-1v-2h-2v2h-1c-1.66,0 -3,-1.34 -3,-3c0,-1.66 1.34,-3 3,-3z" />
|
||||||
|
</vector>
|
||||||
10
android-app/app/src/main/res/drawable/ic_voice_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#9C27B0"
|
||||||
|
android:pathData="M3,10h2v4H3v-4zm4,-3h2v10H7V7zm4,2h2v6h-2V9zm4,-4h2v14h-2V5zm4,5h2v4h-2v-4z" />
|
||||||
|
</vector>
|
||||||
563
android-app/app/src/main/res/layout/activity_fish_pond.xml
Normal file
|
|
@ -0,0 +1,563 @@
|
||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/bg_fishpond_gradient"
|
||||||
|
android:paddingTop="18dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="FishPond"
|
||||||
|
android:textColor="#F4EFFF"
|
||||||
|
android:textSize="22sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/topCard"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:background="@drawable/bg_white_16"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingEnd="14dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/titleText">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/leftInfo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="剩余匹配"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/leftCount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:text="50 人"
|
||||||
|
android:textColor="@color/purple_500"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/leftInfo" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/rightInfo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="真诚 | 南宁 | 在线"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/rightName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:text="陈亚楠"
|
||||||
|
android:textColor="@color/purple_500"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/rightInfo" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/orbitContainer"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="18dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/topCard"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/quickActions">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="360dp"
|
||||||
|
android:layout_height="360dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/bg_orbit_ring" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/centerButton"
|
||||||
|
android:layout_width="92dp"
|
||||||
|
android:layout_height="92dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/bg_purple_circle"
|
||||||
|
android:padding="22dp"
|
||||||
|
android:src="@drawable/ic_home_24" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="top|center_horizontal"
|
||||||
|
android:layout_marginTop="26dp"
|
||||||
|
android:background="@drawable/bg_avatar_ring"
|
||||||
|
android:src="@drawable/ic_account_circle_24" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="center_vertical|start"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:background="@drawable/bg_avatar_ring"
|
||||||
|
android:src="@drawable/ic_account_circle_24" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="center_vertical|end"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:background="@drawable/bg_avatar_ring"
|
||||||
|
android:src="@drawable/ic_account_circle_24" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="bottom|start"
|
||||||
|
android:layout_marginStart="72dp"
|
||||||
|
android:layout_marginBottom="26dp"
|
||||||
|
android:background="@drawable/bg_avatar_ring"
|
||||||
|
android:src="@drawable/ic_account_circle_24" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginEnd="72dp"
|
||||||
|
android:layout_marginBottom="26dp"
|
||||||
|
android:background="@drawable/bg_avatar_ring"
|
||||||
|
android:src="@drawable/ic_account_circle_24" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/floatingMenu"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginEnd="18dp"
|
||||||
|
android:layout_marginBottom="18dp"
|
||||||
|
android:background="@drawable/bg_white_circle"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_grid_24" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/quickActions"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="0dp"
|
||||||
|
app:cardBackgroundColor="@android:color/transparent"
|
||||||
|
app:cardCornerRadius="18dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/orbitContainer"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/bottomAppBar">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/actionLeft"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_pill_left"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?attr/selectableItemBackground"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingEnd="14dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/actionRight"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/actionLeftIcon"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:src="@drawable/ic_voice_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/actionLeftText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:text="语音 ~ 匹配 ~"
|
||||||
|
android:textColor="#9C27B0"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/actionLeftIcon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/actionRight"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:background="@drawable/bg_pill_right"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?attr/selectableItemBackground"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingEnd="14dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/actionLeft"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/actionRightIcon"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:src="@drawable/ic_heart_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/actionRightText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:text="心动信号 ~"
|
||||||
|
android:textColor="#E91E63"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/actionRightIcon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:id="@+id/grid"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:columnCount="3"
|
||||||
|
android:rowCount="2"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/actionLeft">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="88dp"
|
||||||
|
android:layout_columnWeight="1"
|
||||||
|
android:layout_margin="6dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:cardBackgroundColor="#E6FFFFFF">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/i1"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_diamond_rounded"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_heart_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="在线处对象"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/i1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="88dp"
|
||||||
|
android:layout_columnWeight="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:cardBackgroundColor="#E6FFFFFF">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/i2"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_diamond_rounded"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_game_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="找人玩游戏"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/i2"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="88dp"
|
||||||
|
android:layout_columnWeight="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:cardBackgroundColor="#E6FFFFFF">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/i3"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_diamond_rounded"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_ktv_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="一起KTV"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/i3"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="88dp"
|
||||||
|
android:layout_columnWeight="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:cardBackgroundColor="#E6FFFFFF">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/i4"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_diamond_rounded"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_palette_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="你画我猜"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/i4"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="88dp"
|
||||||
|
android:layout_columnWeight="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:cardBackgroundColor="#E6FFFFFF">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/i5"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_diamond_rounded"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_crosshair_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="和平精英"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/i5"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="88dp"
|
||||||
|
android:layout_columnWeight="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardUseCompatPadding="false"
|
||||||
|
app:cardBackgroundColor="#E6FFFFFF">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/i6"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_diamond_rounded"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_bottle_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="桌子游戏"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/i6"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/bottomNavInclude"
|
||||||
|
layout="@layout/include_bottom_nav"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/quickActions"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,49 +1,222 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/startLiveButton"
|
android:id="@+id/appBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:background="@android:color/white">
|
||||||
android:text="开始直播"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/titleText"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:paddingTop="8dp"
|
||||||
android:padding="16dp"
|
android:paddingBottom="8dp">
|
||||||
android:text="Rooms"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/startLiveButton"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<ImageView
|
||||||
android:id="@+id/roomsRecyclerView"
|
android:id="@+id/menuButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="24dp"
|
||||||
android:clipToPadding="false"
|
android:layout_marginStart="16dp"
|
||||||
android:paddingBottom="16dp"
|
android:contentDescription="menu"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:src="@drawable/ic_menu_24"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="@id/topTabs"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/titleText" />
|
app:layout_constraintTop_toTopOf="@id/topTabs" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/topTabs"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
app:tabIndicatorColor="@color/purple_500"
|
||||||
|
app:tabIndicatorFullWidth="false"
|
||||||
|
app:tabSelectedTextColor="@color/purple_500"
|
||||||
|
app:tabTextColor="#666666"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/notificationButton"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/menuButton"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="关注" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="发现" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="附近" />
|
||||||
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/notificationButton"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginEnd="14dp"
|
||||||
|
android:contentDescription="notification"
|
||||||
|
android:src="@drawable/ic_notifications_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/topTabs"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/avatarButton"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/topTabs" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/avatarButton"
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:contentDescription="avatar"
|
||||||
|
android:src="@drawable/ic_account_circle_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/topTabs"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/topTabs" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/searchContainer"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_search"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/topTabs">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/searchIcon"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:contentDescription="search"
|
||||||
|
android:src="@drawable/ic_search_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/searchEdit"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="搜索主播/房间号/标签"
|
||||||
|
android:inputType="text"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textColorHint="#999999"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/micIcon"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/searchIcon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/micIcon"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:contentDescription="mic"
|
||||||
|
android:src="@drawable/ic_mic_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/categoryTabs"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
app:tabIndicatorColor="@color/purple_500"
|
||||||
|
app:tabIndicatorFullWidth="false"
|
||||||
|
app:tabMode="scrollable"
|
||||||
|
app:tabSelectedTextColor="#111111"
|
||||||
|
app:tabTextColor="#666666"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/searchContainer">
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="推荐" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="游戏" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="才艺" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="户外" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="音乐" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="美食" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="聊天" />
|
||||||
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
|
android:id="@+id/swipeRefresh"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/roomsRecyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="12dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="88dp" />
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/loading"
|
android:id="@+id/loading"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
/>
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<include
|
||||||
|
android:id="@+id/bottomNavInclude"
|
||||||
|
layout="@layout/include_bottom_nav"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
||||||
26
android-app/app/src/main/res/layout/activity_messages.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/white">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="88dp"
|
||||||
|
android:text="消息"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/bottomNavInclude"
|
||||||
|
layout="@layout/include_bottom_nav"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
688
android-app/app/src/main/res/layout/activity_profile.xml
Normal file
|
|
@ -0,0 +1,688 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFFFFF">
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:paddingBottom="88dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/profileHeader"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="190dp"
|
||||||
|
android:background="@drawable/bg_profile_header_gradient"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingTop="18dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/avatarRing"
|
||||||
|
android:layout_width="96dp"
|
||||||
|
android:layout_height="96dp"
|
||||||
|
android:background="@drawable/bg_avatar_ring"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="84dp"
|
||||||
|
android:layout_height="84dp"
|
||||||
|
android:background="@drawable/bg_avatar_circle"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_account_circle_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/avatarRing"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/avatarRing"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/avatarRing"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/avatarRing" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/name"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:text="爱你"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/topActionClock"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/avatarRing"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/avatarRing" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/chipsRow"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/topActionClock"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/avatarRing"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/name">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/chipLevel"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:background="@drawable/bg_chip_purple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:text="月亮 20"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/chipFans"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
|
app:layout_constraintHorizontal_weight="1"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/chipFans"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:background="@drawable/bg_chip_yellow"
|
||||||
|
android:gravity="center"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:text="星耀 100"
|
||||||
|
android:textColor="#6A3D00"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/chipBadgeWrap"
|
||||||
|
app:layout_constraintHorizontal_weight="1"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/chipLevel"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/chipLevel" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/chipBadgeWrap"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_weight="1"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/chipFans"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/chipLevel">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/chipBadge"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:background="@drawable/bg_chip_purple"
|
||||||
|
android:gravity="center"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="12dp"
|
||||||
|
android:text="至尊 100"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:layout_gravity="end|top"
|
||||||
|
android:layout_marginTop="-4dp"
|
||||||
|
android:layout_marginEnd="-2dp"
|
||||||
|
android:src="@drawable/ic_crown_16" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/idRow"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/topActionClock"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/avatarRing"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/chipsRow">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:src="@drawable/ic_male_16" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/idLine"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="ID:24187196"
|
||||||
|
android:textColor="#E6FFFFFF"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:src="@drawable/ic_copy_24"
|
||||||
|
android:tint="#E6FFFFFF" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:src="@drawable/ic_grid_24"
|
||||||
|
android:tint="#E6FFFFFF" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/topActionMore"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:background="@drawable/bg_circle_white_60"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:src="@drawable/ic_menu_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/topActionClock"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:background="@drawable/bg_circle_white_60"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:src="@drawable/ic_crosshair_24"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/topActionMore"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/topActionMore" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/topActionSearch"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:background="@drawable/bg_circle_white_60"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:src="@drawable/ic_search_24"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/topActionClock"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/topActionMore" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/profileMainCard"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:layout_marginTop="-58dp"
|
||||||
|
android:background="@drawable/bg_white_16"
|
||||||
|
android:padding="14dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/profileHeader">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/statsRow"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/recordBtn"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/following"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="12\n关注"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/followers"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0\n粉丝"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/likes"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0\n获赞"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/recordBtn"
|
||||||
|
android:layout_width="92dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="录制声音"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/statsRow" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bioText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="填写个人签名更容易获得关注,点击此处添加"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/statsRow" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/tagRow"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/bioText">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:text="IP:广西"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:text="H"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:text="25岁"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:text="金牛座"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:text="性格测试"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/quickActions"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tagRow">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/action1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_gray_12">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_crosshair_24" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="公园勋章"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="暂无勋章"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/action2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_gray_12">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_grid_24" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="观看历史"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="看过的作品等"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/action3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_gray_12">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_heart_24" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="我的挚友"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="0人"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/bottomButtons"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/quickActions">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/editProfile"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="编辑资料 40%"
|
||||||
|
android:textColor="#111111"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/shareHome"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/shareHome"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="分享主页"
|
||||||
|
android:textColor="#111111"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/addFriendBtn"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/editProfile"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/addFriendBtn"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_person_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/shareHome"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/profileTabs"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
app:tabIndicatorColor="@color/purple_500"
|
||||||
|
app:tabSelectedTextColor="#111111"
|
||||||
|
app:tabTextColor="#666666"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/bottomButtons">
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="作品" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="赞过" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="收藏" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="资料" />
|
||||||
|
|
||||||
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/emptyState"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="320dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/profileTabs">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/emptyIcon"
|
||||||
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:background="@drawable/bg_gray_12"
|
||||||
|
android:padding="14dp"
|
||||||
|
android:src="@drawable/ic_person_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/emptyText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="新人报到,快发出你美照"
|
||||||
|
android:textColor="#888888"
|
||||||
|
android:textSize="13sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/emptyIcon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/publishBtn"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:background="@drawable/bg_purple_20"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="去发布"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/emptyText" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/bottomNavInclude"
|
||||||
|
layout="@layout/include_bottom_nav"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
26
android-app/app/src/main/res/layout/activity_wish_tree.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/white">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="88dp"
|
||||||
|
android:text="许愿树"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/bottomNavInclude"
|
||||||
|
layout="@layout/include_bottom_nav"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
26
android-app/app/src/main/res/layout/include_bottom_nav.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<com.google.android.material.bottomappbar.BottomAppBar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/bottomAppBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
app:backgroundTint="@android:color/white"
|
||||||
|
app:contentInsetStart="0dp"
|
||||||
|
app:contentInsetEnd="0dp"
|
||||||
|
app:contentInsetStartWithNavigation="0dp"
|
||||||
|
app:hideOnScroll="false">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
android:id="@+id/bottomNavigation"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
app:itemIconTint="@color/bottom_nav_item_color"
|
||||||
|
app:itemTextColor="@color/bottom_nav_item_color"
|
||||||
|
app:labelVisibilityMode="labeled"
|
||||||
|
app:menu="@menu/bottom_nav_main" />
|
||||||
|
|
||||||
|
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||||
|
|
@ -3,23 +3,22 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_margin="6dp"
|
||||||
android:layout_marginTop="12dp"
|
app:cardCornerRadius="12dp"
|
||||||
app:cardCornerRadius="12dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/roomTitle"
|
android:id="@+id/coverImage"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:text="Room Title"
|
android:background="@drawable/bg_cover_placeholder"
|
||||||
android:textSize="16sp"
|
android:scaleType="centerCrop"
|
||||||
android:textStyle="bold"
|
app:layout_constraintDimensionRatio="H,4:3"
|
||||||
app:layout_constraintEnd_toStartOf="@id/liveBadge"
|
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" />
|
||||||
|
|
||||||
|
|
@ -27,25 +26,93 @@
|
||||||
android:id="@+id/liveBadge"
|
android:id="@+id/liveBadge"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingHorizontal="10dp"
|
android:layout_marginStart="8dp"
|
||||||
android:paddingVertical="4dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
android:text="LIVE"
|
android:text="LIVE"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="12sp"
|
android:textSize="11sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="@id/coverImage"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="@id/coverImage" />
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/streamerName"
|
android:id="@+id/infoContainer"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="6dp"
|
android:paddingStart="10dp"
|
||||||
android:text="Streamer"
|
android:paddingEnd="10dp"
|
||||||
android:textColor="#666666"
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/roomTitle" />
|
app:layout_constraintTop_toBottomOf="@id/coverImage">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/roomTitle"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:text="王者荣耀陪练"
|
||||||
|
android:textColor="#111111"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/streamerAvatar"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/bg_avatar_circle"
|
||||||
|
android:padding="3dp"
|
||||||
|
android:src="@drawable/ic_account_circle_24"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/roomTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/streamerName"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="虚拟主播"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/likeIcon"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/streamerAvatar"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/roomTitle" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/likeIcon"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:src="@drawable/ic_heart_24"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/likeCount"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/roomTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/likeCount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="184"
|
||||||
|
android:textColor="#888888"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/roomTitle" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
|
||||||
29
android-app/app/src/main/res/menu/bottom_nav_main.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_home"
|
||||||
|
android:icon="@drawable/ic_home_24"
|
||||||
|
android:title="首页" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_friends"
|
||||||
|
android:icon="@drawable/ic_people_24"
|
||||||
|
android:title="缘池" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_wish_tree"
|
||||||
|
android:icon="@drawable/ic_tree_24"
|
||||||
|
android:title="许愿树" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_messages"
|
||||||
|
android:icon="@drawable/ic_chat_24"
|
||||||
|
android:title="消息" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_profile"
|
||||||
|
android:icon="@drawable/ic_person_24"
|
||||||
|
android:title="我的" />
|
||||||
|
|
||||||
|
</menu>
|
||||||
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 31 KiB |
BIN
android-app/img/u=4202473567,2071152575&fm=253&fmt=auto.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
android-app/img/v2-874766ff82f5e940d082f66db70daaca_1440w.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |