调整一下顶部距离细节

This commit is contained in:
ningwenqiang 2024-10-31 21:13:19 +08:00
parent 3712dafbed
commit 1bdbb25e94
4 changed files with 35 additions and 28 deletions

View File

@ -7,34 +7,40 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:id="@+id/cupImg" android:id="@+id/img_trophy"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="10dp"
android:layout_marginTop="38dp" android:padding="6dp"
android:onClick="mainClick"
android:layout_marginTop="32dp"
android:src="@mipmap/ic_yola_cup" android:src="@mipmap/ic_yola_cup"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/videoImg" android:id="@+id/btn_start"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="38dp" android:layout_marginTop="32dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="10dp"
android:padding="6dp"
android:onClick="mainClick"
android:src="@mipmap/ic_yola_vido" android:src="@mipmap/ic_yola_vido"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<View <View
android:id="@+id/searchView" android:id="@+id/btn_search"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="34dp" android:layout_height="34dp"
android:clickable="true"
android:onClick="mainClick"
android:background="@drawable/bg_white_radius17" android:background="@drawable/bg_white_radius17"
app:layout_constraintBottom_toBottomOf="@+id/cupImg" app:layout_constraintBottom_toBottomOf="@+id/img_trophy"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/cupImg" app:layout_constraintTop_toTopOf="@+id/img_trophy"
app:layout_constraintWidth_percent="0.66" /> app:layout_constraintWidth_percent="0.66" />
<ImageView <ImageView
@ -43,9 +49,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:src="@mipmap/ic_yola_search_small" android:src="@mipmap/ic_yola_search_small"
app:layout_constraintBottom_toBottomOf="@+id/searchView" app:layout_constraintBottom_toBottomOf="@+id/btn_search"
app:layout_constraintStart_toStartOf="@+id/searchView" app:layout_constraintStart_toStartOf="@+id/btn_search"
app:layout_constraintTop_toTopOf="@+id/searchView" /> app:layout_constraintTop_toTopOf="@+id/btn_search" />
<TextView <TextView
android:id="@+id/searchTipsTv" android:id="@+id/searchTipsTv"
@ -55,14 +61,14 @@
android:text="搜主播名字" android:text="搜主播名字"
android:textColor="#99000000" android:textColor="#99000000"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/searchView" app:layout_constraintBottom_toBottomOf="@+id/btn_search"
app:layout_constraintStart_toEndOf="@+id/searchImg" app:layout_constraintStart_toEndOf="@+id/searchImg"
app:layout_constraintTop_toTopOf="@+id/searchView" /> app:layout_constraintTop_toTopOf="@+id/btn_search" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/topTitleRecyclerView" android:id="@+id/topTitleRecyclerView"
app:layout_constraintTop_toBottomOf="@+id/searchView" app:layout_constraintTop_toBottomOf="@+id/btn_search"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:itemCount="1" tools:itemCount="1"

View File

@ -11,7 +11,7 @@
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="44dp" android:layout_height="44dp"
android:layout_marginTop="20dp" android:layout_marginTop="28dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:fadingEdge="none" android:fadingEdge="none"
app:elevation="0dp" app:elevation="0dp"
@ -31,11 +31,12 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/searchImg" android:id="@+id/btn_search"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:padding="7dp" android:padding="6dp"
android:onClick="mainClick"
android:src="@mipmap/ic_yola_search" android:src="@mipmap/ic_yola_search"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -47,7 +48,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:padding="7dp" android:padding="6dp"
android:src="@mipmap/ic_yola_camera" android:src="@mipmap/ic_yola_camera"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -19,24 +19,24 @@
android:id="@+id/meTitleTv" android:id="@+id/meTitleTv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="34dp"
android:text="@string/game" android:text="@string/game"
android:textColor="@color/color_111111" android:textColor="@color/color_111111"
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintBottom_toBottomOf="@+id/search"
app:layout_constraintTop_toTopOf="@+id/search" />
<ImageView <ImageView
android:id="@+id/search" android:id="@+id/search"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="32dp"
android:padding="6dp" android:padding="6dp"
android:src="@mipmap/ic_yola_search" android:src="@mipmap/ic_yola_search"
app:layout_constraintBottom_toBottomOf="@+id/meTitleTv"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/meTitleTv" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/interactive_game_add" android:id="@+id/interactive_game_add"

View File

@ -32,25 +32,25 @@
android:id="@+id/meTitleTv" android:id="@+id/meTitleTv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="34dp"
android:text="@string/main_me" android:text="@string/main_me"
android:textStyle="bold"
android:textColor="@color/color_111111" android:textColor="@color/color_111111"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/img_setting"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="@+id/img_setting" />
<ImageView <ImageView
android:id="@+id/img_setting" android:id="@+id/img_setting"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:padding="6dp" android:padding="6dp"
android:src="@mipmap/ic_yola_setting" android:src="@mipmap/ic_yola_setting"
app:layout_constraintBottom_toBottomOf="@+id/meTitleTv"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/meTitleTv" /> app:layout_constraintTop_toTopOf="parent" />
<com.makeramen.roundedimageview.RoundedImageView <com.makeramen.roundedimageview.RoundedImageView