Added option in the action bar menu to view archived notifications (#2422)

* changed layout and implemented archived notificaitons feature

* set different texts for toolbar,menu option and no notification text in archived

* modified the startup intent for NotificationsActivity

* disabled swipe on archived

* commit

* fixed navigation drawer on notification activity

* handled on back pressed

* updated strings.xml

* removed TODO

* some minor changes

* set progress bar visibility

* some code quality changes

* commit

* some code quality changes

* removing unused import statements
This commit is contained in:
Shubham Pinjwani 2019-02-10 16:10:08 +05:30 committed by Vivek Maskara
parent cb3a570090
commit a9629c6f99
10 changed files with 186 additions and 80 deletions

View file

@ -7,7 +7,6 @@
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -17,59 +16,53 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/listView"
<RelativeLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
/>
android:layout_below="@id/toolbar">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/no_notification_background"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar">
<ImageView
android:id="@+id/imageView"
android:layout_width="110dp"
android:layout_height="160dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
app:srcCompat="@drawable/ic_notifications_off_black_24dp" />
<TextView
android:id="@+id/no_notification_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView"
android:layout_centerHorizontal="true"
android:text="@string/no_notification"
android:textSize="20sp" />
</RelativeLayout>
</RelativeLayout>
<android.support.constraint.ConstraintLayout
android:id="@+id/no_notification_background"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="118dp"
android:layout_height="172dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.763"
app:srcCompat="@drawable/ic_notifications_off_black_24dp" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="188dp"
android:text="@string/no_notification"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"