Refactor sponsors activity

This commit is contained in:
M M Arif
2019-11-13 23:23:20 +05:00
parent b6c0e94ee9
commit 126d1d0896
6 changed files with 137 additions and 60 deletions

View File

@ -1,4 +1,6 @@
<LinearLayout android:layout_width="match_parent"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
@ -40,56 +42,21 @@
</com.google.android.material.appbar.AppBarLayout>
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundColor">
<LinearLayout
<LinearLayout
android:id="@+id/sponsorsFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:paddingBottom="30dp"
android:orientation="vertical">
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:padding="4dp"
android:scrollbars="vertical" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/liberaPayText"
android:textColor="@color/white"
android:textSize="18sp"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@color/divider" />
<TextView
android:id="@+id/sponsorFabian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/liberaPaySponsorsFabian"
android:textColor="@color/white"
android:textSize="16sp"
android:layout_marginBottom="10dp"
android:textColorLink="@color/lightBlue"
/>
<TextView
android:id="@+id/liberaPaySponsorsThomas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/liberaPaySponsorsThomas"
android:textColor="@color/white"
android:textSize="16sp"
android:layout_marginBottom="10dp"
android:textColorLink="@color/lightBlue"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:background="@color/backgroundColor" >
<TextView
android:id="@+id/sponsorText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:textColor="@color/white"
android:textColorLink="@color/lightBlue"
android:textSize="16sp" />
</RelativeLayout>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="creditsInfo">
<item>Logo by <a href="https://mastodon.social/@kasun">Kasun @Mastodon</a></item>
<item>Credit 2</item>
</string-array>
<string-array name="sponsorsInfo">
<item>Fabian Stamm</item>
<item>Thomas Schneider <a href="https://framapiaf.org/@fedilab">@Fedilab</a></item>
<item>Ljoonal <a href="https://mastodon.ljoonal.xyz/@ljoonal">@ljoonal</a></item>
</string-array>
</resources>

View File

@ -408,12 +408,6 @@
<string name="userExistsError">User already exists</string>
<!-- create user -->
<!-- sponsors -->
<string name="liberaPayText" translatable="false">Liberapay</string>
<string name="liberaPaySponsorsFabian" translatable="false">Fabian Stamm</string>
<string name="liberaPaySponsorsThomas" translatable="false">Thomas Schneider <a href="https://framapiaf.org/@fedilab">@Fedilab</a></string>
<!-- sponsors -->
<!-- edit issue -->
<string name="editIssueNavHeader">Edit Issue #%1$s</string>
<string name="editIssueSuccessMessage">Issue updated.</string>