This commit is contained in:
18142669586 2023-10-05 12:26:22 +08:00
parent 2602725320
commit 41b5ab93dc
5 changed files with 99 additions and 12 deletions

View File

@ -0,0 +1,27 @@
package com.shayu.onetoone.activitys.fragments.home;
import android.os.Bundle;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.shayu.onetoone.R;
import com.shayu.onetoone.activity.AbsOTOActivity;
import com.shayu.onetoone.activity.fragments.message.ChatMessageFragment;
import io.rong.imkit.conversation.ConversationFragment;
/**
* 推荐
*/
public class RecommendActivity extends AbsOTOActivity {
@Override
protected int getLayoutId() {
return R.layout.activity_recommend;
}
@Override
protected void main(Bundle savedInstanceState) {
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,17 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#F7F7F7">
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="357dp"
android:layout_marginEnd="142dp"
android:text="Friends"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.angcyo.tablayout.DslTabLayout
android:id="@+id/dslTabLayout"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginStart="16dp"
android:layout_marginTop="42dp"
android:background="#F7F7F7"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tab_indicator_drawable="@mipmap/ic_message_tab_indicator"
app:tab_select_color="#000"
app:tab_deselect_color="#666666"
app:tab_enable_text_bold="true"
app:tab_enable_gradient_scale="true"
app:tab_text_max_size="20sp"
app:tab_indicator_height="6dp"
app:tab_indicator_width="17dp"
app:tab_indicator_style="STYLE_BOTTOM"
app:tab_item_is_equ_width="true">
<TextView
android:gravity="center"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content"
android:text="消息" />
<TextView
android:gravity="center"
android:textSize="16sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="好友" />
</com.angcyo.tablayout.DslTabLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView android:layout_width="30dp"
android:layout_height="30dp"
/>
</LinearLayout>
</RelativeLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dslTabLayout" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB