Migrate LocalAuthorSpinnerAdapter to XML, add identicons

This commit is contained in:
str4d
2016-01-26 03:39:30 +00:00
parent 35c59fdb39
commit 9318a50cb7
3 changed files with 56 additions and 21 deletions

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<im.delight.android.identicons.SymmetricIdenticon
android:id="@+id/identiconView"
android:layout_width="@dimen/dropdown_picture_size"
android:layout_height="@dimen/dropdown_picture_size"/>
<TextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:ellipsize="end"
android:singleLine="true"
android:textSize="@dimen/text_size_medium"
tools:text="This is a name of an author. It can be quite long."/>
</LinearLayout>

View File

@@ -26,4 +26,6 @@
<dimen name="listitem_height_one_line_avatar">56dp</dimen>
<dimen name="dropdown_picture_size">32dp</dimen>
</resources>