simplify sticky-headers

This commit is contained in:
B. Petersen
2019-05-22 12:14:57 +02:00
parent b4268b12ed
commit 5aa23f0346
6 changed files with 8 additions and 39 deletions
+1 -8
View File
@@ -3,14 +3,7 @@
<item>
<shape>
<padding android:top="1dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
<solid android:color="#101010" />
</shape>
</item>
<item>
<shape>
<padding android:top="1dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
<padding android:top="0dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
<solid android:color="#222222" />
<size android:height="20dp"/>
</shape>
+1 -8
View File
@@ -3,14 +3,7 @@
<item>
<shape>
<padding android:top="1dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
<solid android:color="#d4d4d4" />
</shape>
</item>
<item>
<shape>
<padding android:top="1dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
<padding android:top="0dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
<solid android:color="@color/gray5" />
<size android:height="20dp"/>
</shape>
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/profile_toolbar_background"
android:padding="16dp">
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:textColor="?attr/profile_header_foreground"
android:textSize="14sp"
android:textStyle="bold"
tools:text="March 1, 2015" />
</FrameLayout>
@@ -57,7 +57,7 @@ class ProfileDocumentsAdapter extends StickyHeaderGridAdapter {
HeaderHolder(View itemView) {
super(itemView);
textView = itemView.findViewById(R.id.text);
textView = itemView.findViewById(R.id.label);
}
}
@@ -79,7 +79,7 @@ class ProfileDocumentsAdapter extends StickyHeaderGridAdapter {
@Override
public StickyHeaderGridAdapter.HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent, int headerType) {
return new HeaderHolder(LayoutInflater.from(context).inflate(R.layout.profile_item_header, parent, false));
return new HeaderHolder(LayoutInflater.from(context).inflate(R.layout.contact_selection_list_divider, parent, false));
}
@Override
@@ -50,7 +50,7 @@ class ProfileGalleryAdapter extends StickyHeaderGridAdapter {
HeaderHolder(View itemView) {
super(itemView);
textView = itemView.findViewById(R.id.text);
textView = itemView.findViewById(R.id.label);
}
}
@@ -74,7 +74,7 @@ class ProfileGalleryAdapter extends StickyHeaderGridAdapter {
@Override
public StickyHeaderGridAdapter.HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent, int headerType) {
return new HeaderHolder(LayoutInflater.from(context).inflate(R.layout.profile_item_header, parent, false));
return new HeaderHolder(LayoutInflater.from(context).inflate(R.layout.contact_selection_list_divider, parent, false));
}
@Override
@@ -109,7 +109,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter
TextView textView;
HeaderViewHolder(View itemView) {
super(itemView);
textView = itemView.findViewById(R.id.text);
textView = itemView.findViewById(R.id.label);
}
}
@@ -184,7 +184,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter
@Override
public HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent) {
return new HeaderViewHolder(LayoutInflater.from(context).inflate(R.layout.profile_item_header, parent, false));
return new HeaderViewHolder(LayoutInflater.from(context).inflate(R.layout.contact_selection_list_divider, parent, false));
}
@Override