Announcement UI enhanced
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/commit/b2fb6c16 Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/b2fb6c16 Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/b2fb6c16 Branch: refs/heads/master Commit: b2fb6c167b23eee99bb4025c29236df071bddc21 Parents: 725a5e2 Author: Rajan Maurya <[email protected]> Authored: Wed Oct 5 21:01:22 2016 +0530 Committer: Rajan Maurya <[email protected]> Committed: Wed Oct 5 21:01:22 2016 +0530 ---------------------------------------------------------------------- .../mobile/ui/adapter/AnnouncementAdapter.java | 2 +- app/src/main/res/layout/item_announcement.xml | 59 ++++++++++++++++++++ app/src/main/res/layout/item_recyclerview.xml | 53 ------------------ app/src/main/res/values/dimens.xml | 4 ++ 4 files changed, 64 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/b2fb6c16/app/src/main/java/org/apache/taverna/mobile/ui/adapter/AnnouncementAdapter.java ---------------------------------------------------------------------- diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/adapter/AnnouncementAdapter.java b/app/src/main/java/org/apache/taverna/mobile/ui/adapter/AnnouncementAdapter.java index 328abd5..70b91af 100644 --- a/app/src/main/java/org/apache/taverna/mobile/ui/adapter/AnnouncementAdapter.java +++ b/app/src/main/java/org/apache/taverna/mobile/ui/adapter/AnnouncementAdapter.java @@ -54,7 +54,7 @@ public class AnnouncementAdapter extends RecyclerView.Adapter<RecyclerView.ViewH RecyclerView.ViewHolder vh; if (viewType == VIEW_ITEM) { View v = LayoutInflater.from(parent.getContext()).inflate( - R.layout.item_recyclerview, parent, false); + R.layout.item_announcement, parent, false); vh = new ViewHolder(v); } else { http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/b2fb6c16/app/src/main/res/layout/item_announcement.xml ---------------------------------------------------------------------- diff --git a/app/src/main/res/layout/item_announcement.xml b/app/src/main/res/layout/item_announcement.xml new file mode 100644 index 0000000..a5dd5d6 --- /dev/null +++ b/app/src/main/res/layout/item_announcement.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<android.support.v7.widget.CardView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/cv" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/announcementCardMarginVertical" + android:layout_marginLeft="@dimen/announcementCardMarginHorizontal" + android:layout_marginRight="@dimen/announcementCardMarginHorizontal" + android:layout_marginTop="@dimen/announcementCardMarginVertical" + app:cardCornerRadius="2dp" + app:cardElevation="2pt"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" + android:src="@drawable/ic_announcement_black_24dp"/> + + <TextView + android:id="@+id/textview_announcement" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="left" + android:paddingBottom="5dp" + android:paddingLeft="10dp" + android:paddingStart="10dp" + android:paddingTop="5dp" + android:text="111111" + android:textColor="@android:color/black" + android:textSize="16sp"/> + + </LinearLayout> + +</android.support.v7.widget.CardView> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/b2fb6c16/app/src/main/res/layout/item_recyclerview.xml ---------------------------------------------------------------------- diff --git a/app/src/main/res/layout/item_recyclerview.xml b/app/src/main/res/layout/item_recyclerview.xml deleted file mode 100644 index 23f3389..0000000 --- a/app/src/main/res/layout/item_recyclerview.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<android.support.v7.widget.CardView - android:id="@+id/cv" - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:cardCornerRadius="2dp" - app:cardElevation="2pt" - > - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:layout_marginLeft="10dp" - android:layout_marginStart="10dp" - android:src="@drawable/ic_announcement_black_24dp"/> - <TextView - android:id="@+id/textview_announcement" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingLeft="10dp" - android:paddingStart="10dp" - android:gravity="left" - android:paddingTop="5dp" - android:paddingBottom="5dp" - android:text="111111" - android:textSize="16sp" - android:textColor="@android:color/black" - /> - </LinearLayout> -</android.support.v7.widget.CardView> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/b2fb6c16/app/src/main/res/values/dimens.xml ---------------------------------------------------------------------- diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 43778ec..bc2312b 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -20,6 +20,10 @@ limitations under the License. <dimen name="cardMarginHorizontal">10dp</dimen> <dimen name="cardMarginVertical">8dp</dimen> + <!--Announcement Card margin--> + <dimen name="announcementCardMarginHorizontal">5dp</dimen> + <dimen name="announcementCardMarginVertical">4dp</dimen> + <!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp: https://developer.android.com/design/patterns/navigation-drawer.html --> <dimen name="navigation_drawer_width">240dp</dimen>
