Implemented News with Demo Entries

This commit is contained in:
Caesar2011
2018-11-18 11:12:13 +01:00
parent 8e3360549f
commit 50d07193a0
22 changed files with 399 additions and 34 deletions

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/list_all_caption" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/list_all_items" />

View File

@@ -4,16 +4,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swipe_container"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:name=".fragments.moddetails.ModDetailOverviewFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:context=".fragments.moddetails.ModDetailOverviewFragment"
tools:listitem="@layout/list_all_caption" />
tools:listitem="@layout/list_all_items" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@@ -9,7 +9,12 @@
android:id="@+id/string"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:layout_marginLeft="@dimen/cardview_margin"
android:layout_marginStart="@dimen/cardview_margin"
android:layout_marginTop="@dimen/text_margin"
android:layout_marginBottom="@dimen/text_margin"
android:layout_marginRight="@dimen/cardview_margin"
android:layout_marginEnd="@dimen/cardview_margin"
tools:text="Caption"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Headline" />
</LinearLayout>

View File

@@ -4,12 +4,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp">
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_margin="@dimen/cardview_margin"
card_view:cardElevation="@dimen/cardview_elevation">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dip" >
android:padding="@dimen/cardview_padding" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"

View File

@@ -4,12 +4,12 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp">
android:layout_margin="@dimen/cardview_margin">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dip" >
android:padding="@dimen/cardview_padding" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"

View File

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<de.sebse.fuplanner.tools.ui.cardview.ExpandableCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_margin="@dimen/cardview_margin"
card_view:cardElevation="@dimen/card_elevation"
app:animationDuration="300"
app:inner_view="@layout/list_announcement_body"
app:outer_view="@layout/list_announcement_header"

View File

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<de.sebse.fuplanner.tools.ui.cardview.ExpandableCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_margin="@dimen/cardview_margin"
card_view:cardElevation="@dimen/card_elevation"
app:animationDuration="300"
app:inner_view="@layout/list_canteen_body"
app:outer_view="@layout/list_canteen_header"

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/cardview_margin"
card_view:cardElevation="@dimen/cardview_elevation">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- This is the specific part you asked to color -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorFUBlue"
android:padding="@dimen/cardview_padding"
android:orientation="vertical">
<TextView
android:id="@+id/header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Neues Feature mit einer sehr sehr langen Überschrift!"
android:textColor="@color/colorFUWhite"
android:textStyle="bold"
android:textSize="16sp" />
<TextView
android:id="@+id/sub_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Tipps/Tricks"
android:textColor="@color/colorFUOrange"
android:layout_below="@id/header"
/>
<TextView
android:id="@+id/sub_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="20.09.2018"
android:textColor="@color/colorFUOrange"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@id/header" />
</RelativeLayout>
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/cardview_padding"
tools:text="@string/lorem_ipsum_100" />
</LinearLayout>
</androidx.cardview.widget.CardView>