Add Installed hint for repo modules (#2628)
This commit is contained in:
parent
aa9875eed3
commit
83da5643e9
|
|
@ -328,6 +328,13 @@ public class RepoFragment extends BaseFragment implements RepoLoader.RepoListene
|
|||
sb.setSpan(styleSpan, sb.length() - hint.length(), sb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
|
||||
}
|
||||
sb.setSpan(foregroundColorSpan, sb.length() - hint.length(), sb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
|
||||
} else if (moduleUtil.getModule(module.getName()) != null) {
|
||||
String installed = getString(R.string.installed);
|
||||
sb.append(installed);
|
||||
final StyleSpan styleSpan = new StyleSpan(Typeface.ITALIC);
|
||||
sb.setSpan(styleSpan, sb.length() - installed.length(), sb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
|
||||
final ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(ResourceUtils.resolveColor(requireActivity().getTheme(), com.google.android.material.R.attr.colorSecondary));
|
||||
sb.setSpan(foregroundColorSpan, sb.length() - installed.length(), sb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
holder.hint.setVisibility(View.VISIBLE);
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@
|
|||
<string name="color_deep_orange">Deep orange</string>
|
||||
<string name="color_brown">Brown</string>
|
||||
<string name="color_blue_grey">Blue grey</string>
|
||||
<string name="installed">Installed</string>
|
||||
<plurals name="module_release_assets_download_count">
|
||||
<item quantity="one">%d download</item>
|
||||
<item quantity="other">%d downloads</item>
|
||||
|
|
|
|||
Loading…
Reference in New Issue