Newer
Older
tampopo-client / app / src / main / res / layout / sample_friend_icon_view.xml
<?xml version="1.0" encoding="utf-8" ?>
<LinearLayout 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:orientation="vertical"
    android:gravity="center"
    android:background="@android:color/transparent"
    >

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal">
        <ImageView
            android:id="@+id/friend_comment_image"
            android:layout_width="130dp"
            android:layout_height="60dp"
            android:layout_gravity="center_horizontal"
            android:background="@null"
            android:scaleType="centerCrop"
            android:src="@drawable/comment" />
        <TextView
            android:id="@+id/friend_comment"
            android:layout_width="93dp"
            android:layout_height="32dp"
            android:layout_gravity="center_horizontal"
            android:background="@null"
            android:gravity="center"
            android:text="ひまー"
            android:textColor="@color/black" />
    </FrameLayout>
    <FrameLayout
        android:layout_width="100dp"
        android:layout_height="110dp"
        android:layout_marginTop="-3dp"
        android:layout_gravity="center_horizontal">
        <com.google.android.material.imageview.ShapeableImageView
            android:id="@+id/friend_icon"
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:layout_gravity="center_horizontal"
            android:translationY="2dp"
            android:scaleType="centerCrop"
            android:src="@drawable/my_icon"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.498"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.534"
            app:shapeAppearance="@style/circle"
            app:strokeColor="@color/black"
            app:strokeWidth="2dp" />

        <ImageView
            android:id="@+id/chat_notification"
            android:layout_width="170dp"
            android:layout_height="120dp"
            android:layout_gravity="bottom|center_horizontal"
            android:translationY="-2dp"
            android:translationX="-3dp"
            android:visibility="gone"
            android:gravity="center"
            android:src="@drawable/chat_notification"
            />
    </FrameLayout>

    <TextView
        android:id="@+id/friend_nickname"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="-15dp"
        android:gravity="center"
        android:text=""
        android:textColor="@color/black" />

    <TextView
        android:id="@+id/friend_in_call_status"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="4dp"
        android:background="@drawable/in_call_background"
        android:paddingStart="8dp"
        android:paddingEnd="8dp"
        android:paddingTop="2dp"
        android:paddingBottom="2dp"
        android:text="通話中"
        android:textColor="@android:color/white"
        android:textSize="12sp"
        android:textStyle="bold"
        android:visibility="gone" />
</LinearLayout>