[Android] fix colour of disable-able buttons

Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Harry Bond 2024-09-21 03:56:48 +01:00 committed by Viktor Havaka
parent 5a4e97b818
commit 4eff88ff0a

View file

@ -470,9 +470,10 @@ public class PlacePageView extends Fragment implements View.OnClickListener,
TextView mTvEditPlace = mEditPlace.findViewById(R.id.tv__editor);
TextView mTvAddBusiness = mAddPlace.findViewById(R.id.tv__editor);
TextView mTvAddPlace = mAddPlace.findViewById(R.id.tv__editor);
mTvEditPlace.setTextColor(Editor.nativeShouldEnableEditPlace() ? getResources().getColor(R.color.base_accent) : getResources().getColor(R.color.button_accent_text_disabled));
mTvAddBusiness.setTextColor(Editor.nativeShouldEnableEditPlace() ? getResources().getColor(R.color.base_accent) : getResources().getColor(R.color.button_accent_text_disabled));
mTvAddPlace.setTextColor(Editor.nativeShouldEnableEditPlace() ? getResources().getColor(R.color.base_accent) : getResources().getColor(R.color.button_accent_text_disabled));
final int editPlaceButtonColor = Editor.nativeShouldEnableEditPlace() ? ContextCompat.getColor(getContext(), UiUtils.getStyledResourceId(getContext(), androidx.appcompat.R.attr.colorAccent)) : getResources().getColor(R.color.button_accent_text_disabled);
mTvEditPlace.setTextColor(editPlaceButtonColor);
mTvAddBusiness.setTextColor(editPlaceButtonColor);
mTvAddPlace.setTextColor(editPlaceButtonColor);
UiUtils.showIf(UiUtils.isVisible(mEditPlace)
|| UiUtils.isVisible(mAddOrganisation)
|| UiUtils.isVisible(mAddPlace), mEditTopSpace);