More work on Android contacts
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ContactView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextAvatar"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="centerInside"
|
||||
android:background="@drawable/circle"
|
||||
android:textSize="72sp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center" >
|
||||
</TextView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/CardAvatar"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:elevation="12dp"
|
||||
app:cardCornerRadius="48dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ImageAvatar"
|
||||
android:contentDescription="@string/avatar_image"
|
||||
android:layout_height="96dp"
|
||||
android:layout_width="96dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop" >
|
||||
</ImageView>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Name"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textColor="@color/colorStrong"
|
||||
android:textSize="24sp"
|
||||
tools:ignore="LabelFor">
|
||||
</TextView>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/uris"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="0dp" >
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".AndroidContactsActivity">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/androidContacts"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="10dp" >
|
||||
</ListView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/androidContactRow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextAvatar"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:scaleType="centerInside"
|
||||
android:background="@drawable/circle"
|
||||
android:textSize="24sp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center"
|
||||
android:visibility="gone" >
|
||||
</TextView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/CardAvatar"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:elevation="12dp"
|
||||
app:cardCornerRadius="18dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ImageAvatar"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="36dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@string/avatar_image">
|
||||
</ImageView>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contactName"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="41dp"
|
||||
android:textSize="20sp"
|
||||
android:layout_marginBottom="6dp">
|
||||
</TextView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/uriRow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uri"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp" >
|
||||
</TextView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/message"
|
||||
android:background="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@string/call" >
|
||||
</ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/call"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:src="@drawable/call"
|
||||
android:background="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@string/call" >
|
||||
</ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user