Merge pull request #147 from nextcloud/contactListHeaders

redesign the contacts header/contact items
This commit is contained in:
Mario Đanić 2018-04-26 10:56:59 +02:00 committed by GitHub
commit c8f3467880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 18 deletions

View File

@ -31,7 +31,6 @@ import android.support.design.widget.BottomNavigationView;
import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.MenuItemCompat; import android.support.v4.view.MenuItemCompat;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SearchView; import android.support.v7.widget.SearchView;
import android.text.InputType; import android.text.InputType;
@ -518,11 +517,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
recyclerView.setHasFixedSize(true); recyclerView.setHasFixedSize(true);
recyclerView.setAdapter(adapter); recyclerView.setAdapter(adapter);
recyclerView.addItemDecoration(new DividerItemDecoration(
recyclerView.getContext(),
layoutManager.getOrientation()
));
swipeRefreshLayout.setOnRefreshListener(this::fetchData); swipeRefreshLayout.setOnRefreshListener(this::fetchData);
swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary); swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);

View File

@ -35,7 +35,7 @@
android:layout_height="@dimen/avatar_size" android:layout_height="@dimen/avatar_size"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="48dp"
app:animationDuration="170" app:animationDuration="170"
app:enableInitialAnimation="true" app:enableInitialAnimation="true"
app:rearBackgroundColor="@color/colorPrimary"/> app:rearBackgroundColor="@color/colorPrimary"/>

View File

@ -19,21 +19,26 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>. ~ along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:alpha="0.7" android:orientation="vertical">
android:background="@color/colorPrimary"
android:elevation="5dp"> <View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:attr/listDivider"/>
<TextView <TextView
android:id="@+id/title_text_view" android:id="@+id/title_text_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginEnd="16dp"
android:layout_marginEnd="24dp" android:layout_marginStart="16dp"
android:layout_marginStart="12dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:textColor="@color/nc_white_color_complete"/> android:layout_marginBottom="8dp"
android:textColor="@color/colorPrimary"
tools:text="A"/>
</RelativeLayout> </LinearLayout>