This repository has been archived by the owner on Aug 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notification-inbox): add sample code to display notifications wi…
…th images in customData
- Loading branch information
jpollak
committed
Jun 28, 2017
1 parent
2e77408
commit 2f9de83
Showing
4 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 30 additions & 6 deletions
36
app/src/main/java/com/emarsys/mobileengage/sample/NotificationListAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 37 additions & 5 deletions
42
app/src/main/res/layout/adapter_notification_list_item.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:padding="@dimen/gap_small"> | ||
|
||
<TextView | ||
android:id="@+id/adapterNotificationTitle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" /> | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginRight="16dp" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintHorizontal_bias="1.0" | ||
app:layout_constraintLeft_toRightOf="@+id/imageview" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="Notification title" /> | ||
|
||
<TextView | ||
android:id="@+id/receivedAt" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginRight="16dp" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintHorizontal_bias="0.0" | ||
app:layout_constraintLeft_toRightOf="@+id/imageview" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/adapterNotificationTitle" | ||
tools:text="Received at: 2014. 03. 23" /> | ||
|
||
<ImageView | ||
android:id="@+id/imageview" | ||
android:layout_width="50dp" | ||
android:layout_height="50dp" | ||
android:layout_marginLeft="8dp" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
</LinearLayout> | ||
</android.support.constraint.ConstraintLayout> |