show different inline button when installing app
This could definitely use a better design treatment, but at least it is better than showing the "click to install" button again during the install process. closes #1357
This commit is contained in:
parent
5e75bc060c
commit
01280d65a5
@ -334,6 +334,9 @@ public abstract class AppListItemController extends RecyclerView.ViewHolder {
|
|||||||
case Downloading:
|
case Downloading:
|
||||||
return getViewStateDownloading(app, appStatus);
|
return getViewStateDownloading(app, appStatus);
|
||||||
|
|
||||||
|
case Installing:
|
||||||
|
return getViewStateInstalling(app);
|
||||||
|
|
||||||
case Installed:
|
case Installed:
|
||||||
return getViewStateInstalled(app);
|
return getViewStateInstalled(app);
|
||||||
|
|
||||||
@ -343,6 +346,16 @@ public abstract class AppListItemController extends RecyclerView.ViewHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected AppListItemState getViewStateInstalling(@NonNull App app) {
|
||||||
|
CharSequence mainText = activity.getString(
|
||||||
|
R.string.app_list__name__downloading_in_progress, app.name);
|
||||||
|
|
||||||
|
return new AppListItemState(app)
|
||||||
|
.setMainText(mainText)
|
||||||
|
.showActionButton(null)
|
||||||
|
.setStatusText(activity.getString(R.string.notification_content_single_installing, app.name));
|
||||||
|
}
|
||||||
|
|
||||||
protected AppListItemState getViewStateInstalled(@NonNull App app) {
|
protected AppListItemState getViewStateInstalled(@NonNull App app) {
|
||||||
CharSequence mainText = activity.getString(
|
CharSequence mainText = activity.getString(
|
||||||
R.string.app_list__name__successfully_installed, app.name);
|
R.string.app_list__name__successfully_installed, app.name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user