diff --git a/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java b/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java index c40639c2d..21cc9399e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java @@ -20,7 +20,6 @@ import android.os.AsyncTask; import android.os.Bundle; import android.view.MenuItem; import android.view.View; -import android.widget.TextView; import androidx.annotation.Nullable; import androidx.appcompat.app.ActionBar; @@ -41,6 +40,7 @@ import com.keylesspalace.tusky.db.TootDao; import com.keylesspalace.tusky.db.TootEntity; import com.keylesspalace.tusky.di.Injectable; import com.keylesspalace.tusky.util.SaveTootHelper; +import com.keylesspalace.tusky.view.BackgroundMessageView; import java.lang.ref.WeakReference; import java.lang.reflect.Type; @@ -60,7 +60,7 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd // ui private SavedTootAdapter adapter; - private TextView noContent; + private BackgroundMessageView errorMessageView; private List toots = new ArrayList<>(); @Nullable @@ -95,7 +95,7 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd } RecyclerView recyclerView = findViewById(R.id.recyclerView); - noContent = findViewById(R.id.no_content); + errorMessageView = findViewById(R.id.errorMessageView); recyclerView.setHasFixedSize(true); LinearLayoutManager layoutManager = new LinearLayoutManager(this); recyclerView.setLayoutManager(layoutManager); @@ -136,9 +136,10 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd private void setNoContent(int size) { if (size == 0) { - noContent.setVisibility(View.VISIBLE); + errorMessageView.setup(R.drawable.elephant_friend_empty, R.string.no_saved_status, null); + errorMessageView.setVisibility(View.VISIBLE); } else { - noContent.setVisibility(View.INVISIBLE); + errorMessageView.setVisibility(View.GONE); } } diff --git a/app/src/main/res/layout/activity_saved_toot.xml b/app/src/main/res/layout/activity_saved_toot.xml index 67bd5762f..1771135e7 100644 --- a/app/src/main/res/layout/activity_saved_toot.xml +++ b/app/src/main/res/layout/activity_saved_toot.xml @@ -14,19 +14,21 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> - - + + - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3d8efafcd..21bd1e3ea 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -306,8 +306,6 @@ Follow requested - no content - in %dy in %dd @@ -546,6 +544,7 @@ Edit Error looking up post %s + You don\'t have any drafts. You don\'t have any scheduled statuses.