Use list footer for FAB padding

pull/321/head
Alex Baker 9 years ago
parent d1dd6d7c6d
commit 18168ecf82

@ -289,6 +289,15 @@ public class TaskListFragment extends InjectingListFragment implements SwipeRefr
return parent;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ListView listView = getListView();
View footer = getActivity().getLayoutInflater().inflate(R.layout.task_list_footer, listView, false);
listView.addFooterView(footer, null, false);
}
private void setupRefresh(SwipeRefreshLayout layout) {
layout.setOnRefreshListener(this);
layout.setColorScheme(

@ -8,7 +8,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?attr/asTaskRowSelector"
android:orientation="horizontal">
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rowBody"
@ -123,4 +123,9 @@
</RelativeLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="?attr/asListDividerColor" />
</LinearLayout>

@ -28,7 +28,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:layout_margin="@dimen/task_list_fab_margin"
android:padding="0dp"
app:borderWidth="0dp"/>
</android.support.design.widget.CoordinatorLayout>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/task_list_footer_height"
android:orientation="vertical" />

@ -75,7 +75,6 @@
android:layout_weight="100"
android:listSelector="?attr/selectableItemBackground"
android:drawSelectorOnTop="true"
android:divider="@android:color/transparent"
android:cacheColorHint="@android:color/transparent"
android:scrollingCache="false"
android:scrollbars="vertical"/>

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TaskListView" parent="ListView">
<item name="android:paddingBottom">90dp</item>
<item name="android:clipToPadding">false</item>
</style>
<style name="TaskListView" parent="ListView" />
</resources>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="task_list_fab_margin">16dp</dimen>
<dimen name="task_list_footer_height">88dp</dimen>
</resources>

@ -5,6 +5,9 @@
<dimen name="widget_margin">8dp</dimen>
<dimen name="dialog_width">300dp</dimen>
<dimen name="task_list_footer_height">96dp</dimen>
<dimen name="task_list_fab_margin">0dp</dimen>
<dimen name="task_edit_title_padding_top_bottom">18dp</dimen>
<dimen name="task_edit_padding_top_bottom">9dp</dimen>
<dimen name="task_edit_double_padding_top_bottom">18dp</dimen>

@ -49,16 +49,17 @@
</style>
<!--=============================================== TaskListActivity == -->
<style name="ListView">
<item name="android:divider">?attr/asListDividerColor</item>
<item name="android:dividerHeight">1px</item>
<item name="android:divider">@android:color/transparent</item>
<item name="android:dividerHeight">0px</item>
<item name="android:scrollbars">vertical</item>
<item name="android:cacheColorHint">#00000000</item>
<item name="android:smoothScrollbar">true</item>
</style>
<style name="TaskListView" parent="ListView">
<item name="android:scrollingCache">false</item>
</style>
<!-- ==================================================== TaskAdapter == -->

Loading…
Cancel
Save