In-app notifications #969

Merged
akinwale merged 13 commits from in-app-notifications into master 2020-08-18 15:19:35 +02:00
3 changed files with 38 additions and 28 deletions
Showing only changes of commit b335e47cfa - Show all commits

View file

@ -1563,7 +1563,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
try {
Lbryio.AUTH_TOKEN = new String(Utils.decrypt(
Base64.decode(encryptedAuthToken, Base64.NO_WRAP), this, Lbry.KEYSTORE), "UTF8");
Log.d(TAG, Lbryio.AUTH_TOKEN);
} catch (Exception ex) {
// pass. A new auth token would have to be generated if the old one cannot be decrypted
Log.e(TAG, "Could not decrypt existing auth token.", ex);

View file

@ -74,7 +74,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/notifications_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:paddingTop="8dp"
android:clipToPadding="false"
/>
</RelativeLayout>
<include layout="@layout/floating_wallet_balance" />

View file

@ -1,30 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:background="?attr/selectableItemBackground"
android:clickable="true"
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:id="@+id/notification_title"
android:layout_width="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp">
<LinearLayout
android:orientation="vertical"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:fontFamily="@font/inter"
android:textStyle="bold"
android:textSize="13sp" />
<TextView
android:id="@+id/notification_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:fontFamily="@font/inter"
android:textSize="14sp" />
<TextView
android:id="@+id/notification_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/inter"
android:textSize="11sp" />
</LinearLayout>
android:padding="16dp">
<TextView
android:id="@+id/notification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:fontFamily="@font/inter"
android:textStyle="bold"
android:textSize="13sp" />
<TextView
android:id="@+id/notification_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:fontFamily="@font/inter"
android:textSize="14sp" />
<TextView
android:id="@+id/notification_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/inter"
android:textSize="11sp" />
</LinearLayout>
</androidx.cardview.widget.CardView>