Improve Contact elements layout
This commit is contained in:
parent
09009e003c
commit
ff2a58bcf8
5 changed files with 51 additions and 55 deletions
|
@ -5,6 +5,7 @@ import android.arch.lifecycle.Observer;
|
|||
import android.arch.lifecycle.ViewModelProviders;
|
||||
import android.arch.paging.PagedList;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -40,7 +41,7 @@ public class ContactsFragment extends Fragment {
|
|||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View v = inflater.inflate(R.layout.fragment_contacts, container, false);
|
||||
|
|
|
@ -78,7 +78,8 @@ public class ContactViewHolder extends RecyclerView.ViewHolder {
|
|||
|
||||
Picasso.with(this.context)
|
||||
.load(gravatarUrl)
|
||||
.transform(new CircleTransformation())
|
||||
.placeholder(R.drawable.avatar_placeholder)
|
||||
//.transform(new CircleTransformation())
|
||||
.into(ivThumbnail);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
@ -9,5 +10,6 @@
|
|||
android:id="@+id/contactListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/contact_list_item"
|
||||
/>
|
||||
</LinearLayout>
|
|
@ -1,47 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.constraint.ConstraintLayout
|
||||
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="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<ImageView
|
||||
<cy.agorise.crystalwallet.util.CircularImageView
|
||||
android:id="@+id/ivContactThumbnail"
|
||||
android:layout_width="@dimen/icon_size"
|
||||
android:layout_height="@dimen/icon_size"
|
||||
android:id="@+id/ivContactThumbnail"/>
|
||||
android:src="@drawable/avatar_placeholder"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvContactName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/ivContactThumbnail"
|
||||
android:text="Loading name..."
|
||||
android:textStyle="bold" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
tools:text="Loading name..."
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivContactThumbnail"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLastPaid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tvContactName"
|
||||
android:layout_toRightOf="@+id/ivContactThumbnail"
|
||||
android:text="Paid: Jan 1, 2001, 01:01"
|
||||
android:layout_marginTop="8dp"
|
||||
tools:text="Paid: Jan 1, 2001, 01:01"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:visibility="gone" />
|
||||
app:layout_constraintStart_toStartOf="@id/tvContactName"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvContactName"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDeleteContact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/deleteicon" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
android:src="@drawable/deleteicon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -2,24 +2,10 @@
|
|||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="tab_max_width">264dp</dimen>
|
||||
<dimen name="tab_padding_bottom">16dp</dimen>
|
||||
<dimen name="tab_label">14sp</dimen>
|
||||
<dimen name="custom_tab_layout_height">72dp</dimen>
|
||||
|
||||
<dimen name="app_bar_height">140sp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="text_margin">16dp</dimen>
|
||||
<dimen name="layout_margin">35sp</dimen>
|
||||
<dimen name="webview_margin">30sp</dimen>
|
||||
<dimen name="transactionsheaderpading">5dp</dimen>
|
||||
<dimen name="items_erecipt">70dp</dimen>
|
||||
<dimen name="items_ereciptDouble">140dp</dimen>
|
||||
<dimen name="items_ereciptImage">150dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
|
||||
<!-- Dimensions form the transaction list -->
|
||||
<dimen name="transaction_details_text_size">13sp</dimen>
|
||||
|
||||
<!-- Settings -->
|
||||
<dimen name="icon_size">70dp</dimen>
|
||||
<dimen name="icon_size">60dp</dimen>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue