mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-27 15:59:29 +00:00
Created comment item layout file
This commit is contained in:
parent
8b31b6088c
commit
d2276903b7
34
app/src/main/res/layout/comment_item.xml
Normal file
34
app/src/main/res/layout/comment_item.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/CommentContener"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- User name and image-->
|
||||
<ImageView
|
||||
android:id="@+id/user_account_image"
|
||||
android:layout_width="@dimen/account_image_default_width"
|
||||
android:layout_height="@dimen/account_image_default_height"
|
||||
android:src="@drawable/default_account_image"
|
||||
android:contentDescription="@string/user_image_description" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_account_name"
|
||||
style="@style/CommentUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="User name" />
|
||||
|
||||
|
||||
<!-- Comment content -->
|
||||
<TextView
|
||||
android:id="@+id/comment_text"
|
||||
style="@style/CommentText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="A comment content" />
|
||||
|
||||
</LinearLayout>
|
@ -62,4 +62,27 @@
|
||||
<item name="android:layout_marginTop">5dp</item>
|
||||
<item name="android:layout_marginBottom">2dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- Comments style -->
|
||||
<!-- Comments contener -->
|
||||
<style name="CommentContener">
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingStart">5dp</item>
|
||||
<item name="android:paddingEnd">5dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Comment user name -->
|
||||
<style name="CommentUserName">
|
||||
<item name="android:layout_gravity">center</item>
|
||||
<item name="android:paddingStart">2dp</item>
|
||||
<item name="android:layout_marginEnd">5dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Comment text -->
|
||||
<style name="CommentText">
|
||||
<item name="android:layout_gravity">center</item>
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user