rename BannerUpdatingRepos --> StatusBanner

This commit is contained in:
Hans-Christoph Steiner 2021-04-13 14:42:11 +02:00
parent a505850110
commit 8773d6205c
5 changed files with 9 additions and 9 deletions

View File

@ -21,7 +21,7 @@ import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector; import androidx.test.uiautomator.UiSelector;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import org.fdroid.fdroid.views.BannerUpdatingRepos; import org.fdroid.fdroid.views.StatusBanner;
import org.fdroid.fdroid.views.main.MainActivity; import org.fdroid.fdroid.views.main.MainActivity;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.junit.After; import org.junit.After;
@ -267,7 +267,7 @@ public class MainActivityEspressoTest {
if (!BuildConfig.FLAVOR.startsWith("full")) { if (!BuildConfig.FLAVOR.startsWith("full")) {
return; return;
} }
onView(Matchers.<View>instanceOf(BannerUpdatingRepos.class)).check(matches(not(isDisplayed()))); onView(Matchers.<View>instanceOf(StatusBanner.class)).check(matches(not(isDisplayed())));
onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click()); onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
onView(allOf(withText(R.string.main_menu__latest_apps), isDisplayed())).perform(click()); onView(allOf(withText(R.string.main_menu__latest_apps), isDisplayed())).perform(click());
onView(allOf(withId(R.id.swipe_to_refresh), isDisplayed())) onView(allOf(withId(R.id.swipe_to_refresh), isDisplayed()))

View File

@ -17,7 +17,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<org.fdroid.fdroid.views.BannerUpdatingRepos <org.fdroid.fdroid.views.StatusBanner
android:id="@+id/banner_updating_repos" android:id="@+id/banner_updating_repos"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -33,20 +33,20 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
* *
* @see <a href="https://gitlab.com/fdroid/fdroidclient/-/merge_requests/724">"No internet" banner on main, categories, and updates screen</a> * @see <a href="https://gitlab.com/fdroid/fdroidclient/-/merge_requests/724">"No internet" banner on main, categories, and updates screen</a>
*/ */
public class BannerUpdatingRepos extends androidx.appcompat.widget.AppCompatTextView { public class StatusBanner extends androidx.appcompat.widget.AppCompatTextView {
private int updateServiceStatus = UpdateService.STATUS_COMPLETE_WITH_CHANGES; private int updateServiceStatus = UpdateService.STATUS_COMPLETE_WITH_CHANGES;
private int networkState = ConnectivityMonitorService.FLAG_NET_NO_LIMIT; private int networkState = ConnectivityMonitorService.FLAG_NET_NO_LIMIT;
public BannerUpdatingRepos(Context context) { public StatusBanner(Context context) {
this(context, null); this(context, null);
} }
public BannerUpdatingRepos(Context context, AttributeSet attrs) { public StatusBanner(Context context, AttributeSet attrs) {
this(context, attrs, android.R.attr.textViewStyle); this(context, attrs, android.R.attr.textViewStyle);
} }
public BannerUpdatingRepos(Context context, AttributeSet attrs, int defStyleAttr) { public StatusBanner(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr); super(context, attrs, defStyleAttr);
int padding = (int) getResources().getDimension(R.dimen.banner__padding); int padding = (int) getResources().getDimension(R.dimen.banner__padding);
setPadding(padding, padding, padding, padding); setPadding(padding, padding, padding, padding);

View File

@ -16,7 +16,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<org.fdroid.fdroid.views.BannerUpdatingRepos <org.fdroid.fdroid.views.StatusBanner
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />

View File

@ -18,7 +18,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/mainTabSwapBackground"> android:background="?attr/mainTabSwapBackground">
<org.fdroid.fdroid.views.BannerUpdatingRepos <org.fdroid.fdroid.views.StatusBanner
android:id="@+id/banner_updating_repos" android:id="@+id/banner_updating_repos"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"