Commit cfacfedc authored by Grigory Fedorov's avatar Grigory Fedorov

ContactItemInflater: contact elevation added via XML layout....

ContactItemInflater: contact elevation added via XML layout. contact_list_item: elevation value taken from dimens.
parent 8591a305
......@@ -22,13 +22,11 @@ import com.xabber.android.utils.StringUtils;
public class ContactItemInflater {
final Context context;
private final int elevation;
private int[] accountMainColors;
public ContactItemInflater(Context context) {
this.context = context;
accountMainColors = context.getResources().getIntArray(R.array.account_action_bar);
elevation = context.getResources().getDimensionPixelSize(R.dimen.contact_elevation);
}
public View setUpContactView(View convertView, ViewGroup parent, final AbstractContact contact) {
......@@ -39,9 +37,6 @@ public class ContactItemInflater {
viewHolder = new ContactListItemViewHolder(view);
viewHolder.statusIconSeparator.setVisibility(View.INVISIBLE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
view.setElevation(elevation);
}
view.setTag(viewHolder);
} else {
view = convertView;
......
......@@ -17,7 +17,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/contact_list_item_height"
android:elevation="1dp"
android:elevation="@dimen/contact_elevation"
>
<LinearLayout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment