Showing
8 changed files
with
181 additions
and
23 deletions
| ... | @@ -6,9 +6,14 @@ import android.os.Bundle; | ... | @@ -6,9 +6,14 @@ import android.os.Bundle; |
| 6 | import android.os.Handler; | 6 | import android.os.Handler; |
| 7 | import android.os.Looper; | 7 | import android.os.Looper; |
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | +import android.view.accessibility.AccessibilityEvent; | ||
| 9 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
| 10 | import android.widget.TextView; | 11 | import android.widget.TextView; |
| 11 | 12 | ||
| 13 | +import androidx.annotation.NonNull; | ||
| 14 | +import androidx.core.view.AccessibilityDelegateCompat; | ||
| 15 | +import androidx.core.view.ViewCompat; | ||
| 16 | +import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; | ||
| 12 | import androidx.recyclerview.widget.LinearLayoutManager; | 17 | import androidx.recyclerview.widget.LinearLayoutManager; |
| 13 | import androidx.recyclerview.widget.RecyclerView; | 18 | import androidx.recyclerview.widget.RecyclerView; |
| 14 | 19 | ||
| ... | @@ -63,6 +68,30 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe | ... | @@ -63,6 +68,30 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe |
| 63 | WarpUtils.renderCustomFont(this, R.font.bt_cosmo_bold, mFontHeader); | 68 | WarpUtils.renderCustomFont(this, R.font.bt_cosmo_bold, mFontHeader); |
| 64 | WarpUtils.renderCustomFont(this, R.font.peridot_regular, mTvEmptyCoupons); | 69 | WarpUtils.renderCustomFont(this, R.font.peridot_regular, mTvEmptyCoupons); |
| 65 | 70 | ||
| 71 | + //Accessibility | ||
| 72 | + ViewCompat.setAccessibilityDelegate(mFontHeader, new AccessibilityDelegateCompat() { | ||
| 73 | + @Override | ||
| 74 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 75 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 76 | + info.setClassName("android.widget.TextView"); | ||
| 77 | + info.setHeading(true); | ||
| 78 | + } | ||
| 79 | + }); | ||
| 80 | + mFontHeader.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); | ||
| 81 | + | ||
| 82 | + ViewCompat.setAccessibilityDelegate(mIvBack, new AccessibilityDelegateCompat() { | ||
| 83 | + @Override | ||
| 84 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 85 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 86 | + info.setClassName("android.widget.Button"); | ||
| 87 | + info.setContentDescription(getString(R.string.accessibility_back)); | ||
| 88 | + } | ||
| 89 | + }); | ||
| 90 | + mIvBack.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); | ||
| 91 | + mIvBack.postDelayed(() -> { | ||
| 92 | + mIvBack.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); | ||
| 93 | + }, 1000); | ||
| 94 | + | ||
| 66 | initViews(); | 95 | initViews(); |
| 67 | } | 96 | } |
| 68 | 97 | ... | ... |
| ... | @@ -12,14 +12,19 @@ import android.text.method.LinkMovementMethod; | ... | @@ -12,14 +12,19 @@ import android.text.method.LinkMovementMethod; |
| 12 | import android.view.LayoutInflater; | 12 | import android.view.LayoutInflater; |
| 13 | import android.view.View; | 13 | import android.view.View; |
| 14 | import android.view.ViewGroup; | 14 | import android.view.ViewGroup; |
| 15 | +import android.view.accessibility.AccessibilityEvent; | ||
| 15 | import android.widget.ImageView; | 16 | import android.widget.ImageView; |
| 16 | import android.widget.LinearLayout; | 17 | import android.widget.LinearLayout; |
| 17 | import android.widget.TextView; | 18 | import android.widget.TextView; |
| 18 | 19 | ||
| 20 | +import androidx.annotation.NonNull; | ||
| 19 | import androidx.appcompat.app.AlertDialog; | 21 | import androidx.appcompat.app.AlertDialog; |
| 20 | import androidx.constraintlayout.widget.ConstraintLayout; | 22 | import androidx.constraintlayout.widget.ConstraintLayout; |
| 21 | import androidx.core.content.ContextCompat; | 23 | import androidx.core.content.ContextCompat; |
| 22 | import androidx.core.text.HtmlCompat; | 24 | import androidx.core.text.HtmlCompat; |
| 25 | +import androidx.core.view.AccessibilityDelegateCompat; | ||
| 26 | +import androidx.core.view.ViewCompat; | ||
| 27 | +import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; | ||
| 23 | import androidx.work.OneTimeWorkRequest; | 28 | import androidx.work.OneTimeWorkRequest; |
| 24 | import androidx.work.WorkManager; | 29 | import androidx.work.WorkManager; |
| 25 | 30 | ||
| ... | @@ -177,6 +182,59 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -177,6 +182,59 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
| 177 | mTvBarcodeTitle, mFontButtonActiveGiftIt); | 182 | mTvBarcodeTitle, mFontButtonActiveGiftIt); |
| 178 | WarpUtils.renderCustomFont(this, R.font.peridot_semi_bold, mFontButtonGiftIt, mTvFindIt); | 183 | WarpUtils.renderCustomFont(this, R.font.peridot_semi_bold, mFontButtonGiftIt, mTvFindIt); |
| 179 | 184 | ||
| 185 | + //Accessibility | ||
| 186 | + ViewCompat.setAccessibilityDelegate(mFontHeader, new AccessibilityDelegateCompat() { | ||
| 187 | + @Override | ||
| 188 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 189 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 190 | + info.setClassName("android.widget.TextView"); | ||
| 191 | + info.setHeading(true); | ||
| 192 | + } | ||
| 193 | + }); | ||
| 194 | + mFontHeader.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); | ||
| 195 | + | ||
| 196 | + ViewCompat.setAccessibilityDelegate(mIvBack, new AccessibilityDelegateCompat() { | ||
| 197 | + @Override | ||
| 198 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 199 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 200 | + info.setClassName("android.widget.Button"); | ||
| 201 | + info.setContentDescription(getString(R.string.accessibility_back)); | ||
| 202 | + } | ||
| 203 | + }); | ||
| 204 | + mIvBack.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); | ||
| 205 | + mIvBack.postDelayed(() -> { | ||
| 206 | + mIvBack.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); | ||
| 207 | + }, 1000); | ||
| 208 | + | ||
| 209 | + ViewCompat.setAccessibilityDelegate(mLlGiftIt, new AccessibilityDelegateCompat() { | ||
| 210 | + @Override | ||
| 211 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 212 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 213 | + info.setClassName("android.widget.Button"); | ||
| 214 | + info.setContentDescription(getString(R.string.cos_gift_it)); | ||
| 215 | + } | ||
| 216 | + }); | ||
| 217 | + | ||
| 218 | + ViewCompat.setAccessibilityDelegate(mLlShops, new AccessibilityDelegateCompat() { | ||
| 219 | + @Override | ||
| 220 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 221 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 222 | + info.setClassName("android.widget.Button"); | ||
| 223 | + info.setContentDescription(getString(R.string.cos_shops)); | ||
| 224 | + } | ||
| 225 | + }); | ||
| 226 | + | ||
| 227 | + mTvTermsValue.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); | ||
| 228 | + ViewCompat.setAccessibilityDelegate(mLlTerms, new AccessibilityDelegateCompat() { | ||
| 229 | + @Override | ||
| 230 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 231 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 232 | + info.setClassName("android.widget.Button"); | ||
| 233 | + info.setContentDescription(getString(R.string.cos_coupon_terms_title)); | ||
| 234 | + info.setStateDescription(getString(R.string.accessibility_collapse)); | ||
| 235 | + } | ||
| 236 | + }); | ||
| 237 | + | ||
| 180 | initViews(); | 238 | initViews(); |
| 181 | } | 239 | } |
| 182 | 240 | ||
| ... | @@ -282,12 +340,37 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -282,12 +340,37 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
| 282 | } | 340 | } |
| 283 | if (view.getId() == R.id.ll_terms_inner) { | 341 | if (view.getId() == R.id.ll_terms_inner) { |
| 284 | if (mIsTermsShown) { | 342 | if (mIsTermsShown) { |
| 343 | + mTvTermsValue.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); | ||
| 344 | + ViewCompat.setAccessibilityDelegate(mLlTerms, new AccessibilityDelegateCompat() { | ||
| 345 | + @Override | ||
| 346 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 347 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 348 | + info.setClassName("android.widget.Button"); | ||
| 349 | + info.setContentDescription(getString(R.string.cos_coupon_terms_title)); | ||
| 350 | + info.setStateDescription(getString(R.string.accessibility_collapse)); | ||
| 351 | + } | ||
| 352 | + }); | ||
| 353 | + | ||
| 285 | mTvTermsValue.setVisibility(View.GONE); | 354 | mTvTermsValue.setVisibility(View.GONE); |
| 286 | ImageView termsButtonArrow = mLlTerms.findViewById(R.id.iv_terms_arrow); | 355 | ImageView termsButtonArrow = mLlTerms.findViewById(R.id.iv_terms_arrow); |
| 287 | termsButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_down_dark_new)); | 356 | termsButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_down_dark_new)); |
| 288 | mIsTermsShown = false; | 357 | mIsTermsShown = false; |
| 289 | } else { | 358 | } else { |
| 359 | + ViewCompat.setAccessibilityDelegate(mLlTerms, new AccessibilityDelegateCompat() { | ||
| 360 | + @Override | ||
| 361 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 362 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 363 | + info.setClassName("android.widget.Button"); | ||
| 364 | + info.setContentDescription(getString(R.string.cos_coupon_terms_title)); | ||
| 365 | + info.setStateDescription(getString(R.string.accessibility_expand)); | ||
| 366 | + } | ||
| 367 | + }); | ||
| 368 | + | ||
| 290 | mTvTermsValue.setVisibility(View.VISIBLE); | 369 | mTvTermsValue.setVisibility(View.VISIBLE); |
| 370 | + | ||
| 371 | + mTvTermsValue.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); | ||
| 372 | + mTvTermsValue.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); | ||
| 373 | + | ||
| 291 | ImageView termsButtonArrow = mLlTerms.findViewById(R.id.iv_terms_arrow); | 374 | ImageView termsButtonArrow = mLlTerms.findViewById(R.id.iv_terms_arrow); |
| 292 | termsButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_up_dark_new)); | 375 | termsButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_up_dark_new)); |
| 293 | mIsTermsShown = true; | 376 | mIsTermsShown = true; | ... | ... |
| ... | @@ -83,7 +83,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -83,7 +83,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 83 | mHistoryPressed = false, mHistoryMarketPressed = false, | 83 | mHistoryPressed = false, mHistoryMarketPressed = false, |
| 84 | mHistoryBadgePressed = false, mUnifiedCountPressed = false, | 84 | mHistoryBadgePressed = false, mUnifiedCountPressed = false, |
| 85 | mGiftsCountPressed = false, mBoxCountPressed = false; | 85 | mGiftsCountPressed = false, mBoxCountPressed = false; |
| 86 | - private RelativeLayout mRlDeals, mRlUnified, mRlGifts, mRlBox; | 86 | + private RelativeLayout mRlDeals, mRlUnified, mRlGifts, mRlBox, mRlHistory; |
| 87 | private boolean mIsDealsEmpty = false, mIsMarketsEmpty = false, mIsCouponsEmpty = false; | 87 | private boolean mIsDealsEmpty = false, mIsMarketsEmpty = false, mIsCouponsEmpty = false; |
| 88 | private HorizontalScrollView mTilesScroll; | 88 | private HorizontalScrollView mTilesScroll; |
| 89 | private View mFirstStart, mFirstEnd, mSecondStart, mSecondEnd; | 89 | private View mFirstStart, mFirstEnd, mSecondStart, mSecondEnd; |
| ... | @@ -145,6 +145,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -145,6 +145,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 145 | mFontQuestionnaire = view.findViewById(R.id.tv_questionnaire); | 145 | mFontQuestionnaire = view.findViewById(R.id.tv_questionnaire); |
| 146 | mFontQuestionnaireCentered = view.findViewById(R.id.tv_questionnaire_centered); | 146 | mFontQuestionnaireCentered = view.findViewById(R.id.tv_questionnaire_centered); |
| 147 | mFontCountDisabled = view.findViewById(R.id.tv_vouchers_count_disabled); | 147 | mFontCountDisabled = view.findViewById(R.id.tv_vouchers_count_disabled); |
| 148 | + mRlHistory = view.findViewById(R.id.rl_loyalty_history); | ||
| 148 | 149 | ||
| 149 | if (getContext() != null) { | 150 | if (getContext() != null) { |
| 150 | WarpUtils.renderCustomFont(getContext(), R.font.bt_cosmo_bold, mFontHeader, mTvVouchersTitle, | 151 | WarpUtils.renderCustomFont(getContext(), R.font.bt_cosmo_bold, mFontHeader, mTvVouchersTitle, |
| ... | @@ -167,12 +168,13 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -167,12 +168,13 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 167 | }); | 168 | }); |
| 168 | mFontHeader.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); | 169 | mFontHeader.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); |
| 169 | 170 | ||
| 170 | - ViewCompat.setAccessibilityDelegate(mIvHistory, new AccessibilityDelegateCompat() { | 171 | + ViewCompat.setAccessibilityDelegate(mRlHistory, new AccessibilityDelegateCompat() { |
| 171 | @Override | 172 | @Override |
| 172 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | 173 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { |
| 173 | super.onInitializeAccessibilityNodeInfo(host, info); | 174 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 174 | info.setClassName("android.widget.Button"); | 175 | info.setClassName("android.widget.Button"); |
| 175 | - info.setContentDescription("Ιστορικό"); | 176 | + if (getContext() != null) |
| 177 | + info.setContentDescription(getContext().getString(R.string.accessibility_history)); | ||
| 176 | } | 178 | } |
| 177 | }); | 179 | }); |
| 178 | 180 | ||
| ... | @@ -181,6 +183,9 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -181,6 +183,9 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 181 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | 183 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { |
| 182 | super.onInitializeAccessibilityNodeInfo(host, info); | 184 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 183 | info.setClassName("android.widget.Button"); | 185 | info.setClassName("android.widget.Button"); |
| 186 | + if (getContext() != null) | ||
| 187 | + info.setContentDescription(WarplyManagerHelper.getUserTag(getContext())); | ||
| 188 | + | ||
| 184 | } | 189 | } |
| 185 | }); | 190 | }); |
| 186 | 191 | ||
| ... | @@ -189,6 +194,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -189,6 +194,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 189 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | 194 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { |
| 190 | super.onInitializeAccessibilityNodeInfo(host, info); | 195 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 191 | info.setClassName("android.widget.Button"); | 196 | info.setClassName("android.widget.Button"); |
| 197 | + if (getContext() != null) | ||
| 198 | + info.setContentDescription(WarplyManagerHelper.getUserTag(getContext())); | ||
| 192 | } | 199 | } |
| 193 | }); | 200 | }); |
| 194 | 201 | ||
| ... | @@ -197,6 +204,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -197,6 +204,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 197 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | 204 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { |
| 198 | super.onInitializeAccessibilityNodeInfo(host, info); | 205 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 199 | info.setClassName("android.widget.Button"); | 206 | info.setClassName("android.widget.Button"); |
| 207 | + if (getContext() != null) | ||
| 208 | + info.setContentDescription(getContext().getString(R.string.cos_profile_preferences)); | ||
| 200 | } | 209 | } |
| 201 | }); | 210 | }); |
| 202 | 211 | ||
| ... | @@ -205,6 +214,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -205,6 +214,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 205 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | 214 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { |
| 206 | super.onInitializeAccessibilityNodeInfo(host, info); | 215 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 207 | info.setClassName("android.widget.Button"); | 216 | info.setClassName("android.widget.Button"); |
| 217 | + if (getContext() != null) | ||
| 218 | + info.setContentDescription(getContext().getString(R.string.cos_profile_preferences)); | ||
| 208 | } | 219 | } |
| 209 | }); | 220 | }); |
| 210 | 221 | ||
| ... | @@ -213,6 +224,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -213,6 +224,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 213 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | 224 | public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { |
| 214 | super.onInitializeAccessibilityNodeInfo(host, info); | 225 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 215 | info.setClassName("android.widget.Button"); | 226 | info.setClassName("android.widget.Button"); |
| 227 | + if (getContext() != null) | ||
| 228 | + info.setContentDescription(getContext().getString(R.string.cos_vouchers_info_title)); | ||
| 216 | } | 229 | } |
| 217 | }); | 230 | }); |
| 218 | 231 | ||
| ... | @@ -222,6 +235,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -222,6 +235,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 222 | super.onInitializeAccessibilityNodeInfo(host, info); | 235 | super.onInitializeAccessibilityNodeInfo(host, info); |
| 223 | info.setClassName("android.widget.Button"); | 236 | info.setClassName("android.widget.Button"); |
| 224 | info.setEnabled(false); | 237 | info.setEnabled(false); |
| 238 | + if (getContext() != null) | ||
| 239 | + info.setContentDescription(getContext().getString(R.string.cos_vouchers_info_title_disabled)); | ||
| 225 | } | 240 | } |
| 226 | }); | 241 | }); |
| 227 | 242 | ||
| ... | @@ -452,7 +467,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -452,7 +467,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 452 | return; | 467 | return; |
| 453 | } | 468 | } |
| 454 | /** New History */ | 469 | /** New History */ |
| 455 | - if (view.getId() == R.id.iv_loyalty_history) { | 470 | + if (view.getId() == R.id.rl_loyalty_history) { |
| 456 | if (!mHistoryBadgePressed) { | 471 | if (!mHistoryBadgePressed) { |
| 457 | WarplyAnalyticsManager.logTrackersEvent(getContext(), "click", ("LoyaltyWalletScreen") | 472 | WarplyAnalyticsManager.logTrackersEvent(getContext(), "click", ("LoyaltyWalletScreen") |
| 458 | .concat(":") | 473 | .concat(":") |
| ... | @@ -597,8 +612,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -597,8 +612,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 597 | SortTileModel tileUnified = new SortTileModel(); | 612 | SortTileModel tileUnified = new SortTileModel(); |
| 598 | // if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0) { | 613 | // if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0) { |
| 599 | // tileUnified.setCount(WarplyManagerHelper.getMarketCouponsList().size()); | 614 | // tileUnified.setCount(WarplyManagerHelper.getMarketCouponsList().size()); |
| 600 | - tileUnified.setCount(1); | 615 | + tileUnified.setCount(1); |
| 601 | - tileUnified.setWeight(2); | 616 | + tileUnified.setWeight(2); |
| 602 | // } else { | 617 | // } else { |
| 603 | // tileUnified.setCount(0); | 618 | // tileUnified.setCount(0); |
| 604 | // tileUnified.setWeight(2); | 619 | // tileUnified.setWeight(2); |
| ... | @@ -870,7 +885,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener | ... | @@ -870,7 +885,7 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener |
| 870 | mLlQuestionnaireCentered.setOnClickListener(this); | 885 | mLlQuestionnaireCentered.setOnClickListener(this); |
| 871 | mLlUserBadge.setOnClickListener(this); | 886 | mLlUserBadge.setOnClickListener(this); |
| 872 | mLlUserBadgeCentered.setOnClickListener(this); | 887 | mLlUserBadgeCentered.setOnClickListener(this); |
| 873 | - mIvHistory.setOnClickListener(this); | 888 | + mRlHistory.setOnClickListener(this); |
| 874 | // mRlDeals.setOnClickListener(this); | 889 | // mRlDeals.setOnClickListener(this); |
| 875 | // mRlUnified.setOnClickListener(this); | 890 | // mRlUnified.setOnClickListener(this); |
| 876 | // mRlGifts.setOnClickListener(this); | 891 | // mRlGifts.setOnClickListener(this); | ... | ... |
| ... | @@ -11,8 +11,12 @@ import android.widget.ImageView; | ... | @@ -11,8 +11,12 @@ import android.widget.ImageView; |
| 11 | import android.widget.LinearLayout; | 11 | import android.widget.LinearLayout; |
| 12 | import android.widget.TextView; | 12 | import android.widget.TextView; |
| 13 | 13 | ||
| 14 | +import androidx.annotation.NonNull; | ||
| 14 | import androidx.constraintlayout.widget.ConstraintLayout; | 15 | import androidx.constraintlayout.widget.ConstraintLayout; |
| 15 | import androidx.core.content.ContextCompat; | 16 | import androidx.core.content.ContextCompat; |
| 17 | +import androidx.core.view.AccessibilityDelegateCompat; | ||
| 18 | +import androidx.core.view.ViewCompat; | ||
| 19 | +import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; | ||
| 16 | import androidx.recyclerview.widget.RecyclerView; | 20 | import androidx.recyclerview.widget.RecyclerView; |
| 17 | 21 | ||
| 18 | import com.bumptech.glide.Glide; | 22 | import com.bumptech.glide.Glide; |
| ... | @@ -98,6 +102,14 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -98,6 +102,14 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
| 98 | 102 | ||
| 99 | if (mIsCustom) | 103 | if (mIsCustom) |
| 100 | WarpUtils.renderCustomFont(mContext, R.font.peridot_semi_bold, tvCouponDateExpired, tvDateLimit, tvDateLimitTitle); | 104 | WarpUtils.renderCustomFont(mContext, R.font.peridot_semi_bold, tvCouponDateExpired, tvDateLimit, tvDateLimitTitle); |
| 105 | + | ||
| 106 | + ViewCompat.setAccessibilityDelegate(view, new AccessibilityDelegateCompat() { | ||
| 107 | + @Override | ||
| 108 | + public void onInitializeAccessibilityNodeInfo(View host, @NonNull AccessibilityNodeInfoCompat info) { | ||
| 109 | + super.onInitializeAccessibilityNodeInfo(host, info); | ||
| 110 | + info.setClassName("android.widget.Button"); | ||
| 111 | + } | ||
| 112 | + }); | ||
| 101 | } | 113 | } |
| 102 | } | 114 | } |
| 103 | 115 | ... | ... |
| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| 19 | android:layout_height="48dp" | 19 | android:layout_height="48dp" |
| 20 | android:layout_marginStart="16dp" | 20 | android:layout_marginStart="16dp" |
| 21 | android:scaleType="centerInside" | 21 | android:scaleType="centerInside" |
| 22 | + android:contentDescription="@string/accessibility_back" | ||
| 22 | android:src="@drawable/ic_back" | 23 | android:src="@drawable/ic_back" |
| 23 | app:layout_constraintBottom_toBottomOf="parent" | 24 | app:layout_constraintBottom_toBottomOf="parent" |
| 24 | app:layout_constraintStart_toStartOf="parent" | 25 | app:layout_constraintStart_toStartOf="parent" |
| ... | @@ -30,6 +31,7 @@ | ... | @@ -30,6 +31,7 @@ |
| 30 | android:layout_height="wrap_content" | 31 | android:layout_height="wrap_content" |
| 31 | android:gravity="center" | 32 | android:gravity="center" |
| 32 | android:text="@string/cos_free_coupons" | 33 | android:text="@string/cos_free_coupons" |
| 34 | + android:contentDescription="@string/cos_free_coupons" | ||
| 33 | android:textColor="@color/cos_light_black" | 35 | android:textColor="@color/cos_light_black" |
| 34 | android:textSize="19sp" | 36 | android:textSize="19sp" |
| 35 | app:layout_constraintBottom_toBottomOf="parent" | 37 | app:layout_constraintBottom_toBottomOf="parent" | ... | ... |
| ... | @@ -18,6 +18,7 @@ | ... | @@ -18,6 +18,7 @@ |
| 18 | android:layout_marginStart="16dp" | 18 | android:layout_marginStart="16dp" |
| 19 | android:scaleType="centerInside" | 19 | android:scaleType="centerInside" |
| 20 | android:src="@drawable/ic_back" | 20 | android:src="@drawable/ic_back" |
| 21 | + android:contentDescription="@string/accessibility_back" | ||
| 21 | app:layout_constraintBottom_toBottomOf="parent" | 22 | app:layout_constraintBottom_toBottomOf="parent" |
| 22 | app:layout_constraintStart_toStartOf="parent" | 23 | app:layout_constraintStart_toStartOf="parent" |
| 23 | app:layout_constraintTop_toTopOf="parent" /> | 24 | app:layout_constraintTop_toTopOf="parent" /> |
| ... | @@ -27,6 +28,7 @@ | ... | @@ -27,6 +28,7 @@ |
| 27 | android:layout_width="wrap_content" | 28 | android:layout_width="wrap_content" |
| 28 | android:layout_height="wrap_content" | 29 | android:layout_height="wrap_content" |
| 29 | android:text="@string/cos_coupon_info_title" | 30 | android:text="@string/cos_coupon_info_title" |
| 31 | + android:contentDescription="@string/cos_coupon_info_title" | ||
| 30 | android:textColor="@color/cos_light_black" | 32 | android:textColor="@color/cos_light_black" |
| 31 | android:textSize="19sp" | 33 | android:textSize="19sp" |
| 32 | app:layout_constraintBottom_toBottomOf="parent" | 34 | app:layout_constraintBottom_toBottomOf="parent" |
| ... | @@ -63,6 +65,7 @@ | ... | @@ -63,6 +65,7 @@ |
| 63 | android:layout_width="match_parent" | 65 | android:layout_width="match_parent" |
| 64 | android:layout_height="222dp" | 66 | android:layout_height="222dp" |
| 65 | android:scaleType="centerCrop" | 67 | android:scaleType="centerCrop" |
| 68 | + android:contentDescription="@string/accessibility_coupon_image" | ||
| 66 | tools:src="@drawable/carousel_banner" /> | 69 | tools:src="@drawable/carousel_banner" /> |
| 67 | 70 | ||
| 68 | <LinearLayout | 71 | <LinearLayout | ... | ... |
| ... | @@ -16,8 +16,6 @@ | ... | @@ -16,8 +16,6 @@ |
| 16 | android:id="@+id/ll_banner_info_new" | 16 | android:id="@+id/ll_banner_info_new" |
| 17 | android:layout_width="match_parent" | 17 | android:layout_width="match_parent" |
| 18 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 19 | - android:layout_marginHorizontal="14dp" | ||
| 20 | - android:layout_marginTop="16dp" | ||
| 21 | android:orientation="vertical"> | 19 | android:orientation="vertical"> |
| 22 | 20 | ||
| 23 | <LinearLayout | 21 | <LinearLayout |
| ... | @@ -29,24 +27,34 @@ | ... | @@ -29,24 +27,34 @@ |
| 29 | <TextView | 27 | <TextView |
| 30 | android:id="@+id/tv_coupons_header" | 28 | android:id="@+id/tv_coupons_header" |
| 31 | android:layout_width="wrap_content" | 29 | android:layout_width="wrap_content" |
| 32 | - android:layout_height="wrap_content" | 30 | + android:layout_height="match_parent" |
| 33 | android:layout_weight="1" | 31 | android:layout_weight="1" |
| 32 | + android:contentDescription="@string/cos_coupons_header" | ||
| 34 | android:includeFontPadding="false" | 33 | android:includeFontPadding="false" |
| 35 | android:maxLines="1" | 34 | android:maxLines="1" |
| 35 | + android:paddingStart="14dp" | ||
| 36 | android:text="@string/cos_coupons_header" | 36 | android:text="@string/cos_coupons_header" |
| 37 | - android:contentDescription="@string/cos_coupons_header" | 37 | + android:gravity="center_vertical" |
| 38 | android:textColor="@color/cos_light_black" | 38 | android:textColor="@color/cos_light_black" |
| 39 | android:textSize="20sp" /> | 39 | android:textSize="20sp" /> |
| 40 | 40 | ||
| 41 | - <ImageView | 41 | + <RelativeLayout |
| 42 | - android:id="@+id/iv_loyalty_history" | 42 | + android:id="@+id/rl_loyalty_history" |
| 43 | - android:layout_width="24dp" | 43 | + android:layout_width="wrap_content" |
| 44 | - android:layout_height="24dp" | 44 | + android:layout_height="wrap_content" |
| 45 | - android:contentDescription="Ιστορικό" | 45 | + android:paddingHorizontal="14dp" |
| 46 | - android:src="@drawable/ic_history_black" | 46 | + android:paddingVertical="16dp"> |
| 47 | - app:layout_constraintBottom_toBottomOf="parent" | 47 | + |
| 48 | - app:layout_constraintStart_toStartOf="parent" | 48 | + <ImageView |
| 49 | - app:layout_constraintTop_toTopOf="parent" /> | 49 | + android:id="@+id/iv_loyalty_history" |
| 50 | + android:layout_width="24dp" | ||
| 51 | + android:layout_height="24dp" | ||
| 52 | + android:contentDescription="Ιστορικό" | ||
| 53 | + android:src="@drawable/ic_history_black" | ||
| 54 | + app:layout_constraintBottom_toBottomOf="parent" | ||
| 55 | + app:layout_constraintStart_toStartOf="parent" | ||
| 56 | + app:layout_constraintTop_toTopOf="parent" /> | ||
| 57 | + </RelativeLayout> | ||
| 50 | </LinearLayout> | 58 | </LinearLayout> |
| 51 | </LinearLayout> | 59 | </LinearLayout> |
| 52 | 60 | ||
| ... | @@ -54,7 +62,7 @@ | ... | @@ -54,7 +62,7 @@ |
| 54 | android:id="@+id/scr_tiles" | 62 | android:id="@+id/scr_tiles" |
| 55 | android:layout_width="match_parent" | 63 | android:layout_width="match_parent" |
| 56 | android:layout_height="wrap_content" | 64 | android:layout_height="wrap_content" |
| 57 | - android:layout_marginTop="18dp" | 65 | + android:layout_marginTop="2dp" |
| 58 | android:fillViewport="true" | 66 | android:fillViewport="true" |
| 59 | android:scrollbars="none"> | 67 | android:scrollbars="none"> |
| 60 | 68 | ||
| ... | @@ -681,9 +689,9 @@ | ... | @@ -681,9 +689,9 @@ |
| 681 | android:id="@+id/tv_vouchers_title" | 689 | android:id="@+id/tv_vouchers_title" |
| 682 | android:layout_width="wrap_content" | 690 | android:layout_width="wrap_content" |
| 683 | android:layout_height="wrap_content" | 691 | android:layout_height="wrap_content" |
| 692 | + android:contentDescription="@string/cos_vouchers_title" | ||
| 684 | android:includeFontPadding="false" | 693 | android:includeFontPadding="false" |
| 685 | android:maxLines="1" | 694 | android:maxLines="1" |
| 686 | - android:contentDescription="@string/cos_vouchers_title" | ||
| 687 | android:text="@string/cos_vouchers_title" | 695 | android:text="@string/cos_vouchers_title" |
| 688 | android:textColor="@color/cos_light_black" | 696 | android:textColor="@color/cos_light_black" |
| 689 | android:textSize="20sp" /> | 697 | android:textSize="20sp" /> |
| ... | @@ -755,9 +763,9 @@ | ... | @@ -755,9 +763,9 @@ |
| 755 | android:id="@+id/tv_vouchers_title_disabled" | 763 | android:id="@+id/tv_vouchers_title_disabled" |
| 756 | android:layout_width="wrap_content" | 764 | android:layout_width="wrap_content" |
| 757 | android:layout_height="wrap_content" | 765 | android:layout_height="wrap_content" |
| 766 | + android:contentDescription="@string/cos_vouchers_title" | ||
| 758 | android:includeFontPadding="false" | 767 | android:includeFontPadding="false" |
| 759 | android:maxLines="1" | 768 | android:maxLines="1" |
| 760 | - android:contentDescription="@string/cos_vouchers_title" | ||
| 761 | android:text="@string/cos_vouchers_title" | 769 | android:text="@string/cos_vouchers_title" |
| 762 | android:textColor="@color/cos_light_black" | 770 | android:textColor="@color/cos_light_black" |
| 763 | android:textSize="20sp" /> | 771 | android:textSize="20sp" /> | ... | ... |
| ... | @@ -261,6 +261,12 @@ | ... | @@ -261,6 +261,12 @@ |
| 261 | <string name="cos_login_text">Σύνδεση</string> | 261 | <string name="cos_login_text">Σύνδεση</string> |
| 262 | <string name="cos_logout_text">Αποσύνδεση</string> | 262 | <string name="cos_logout_text">Αποσύνδεση</string> |
| 263 | 263 | ||
| 264 | + <string name="accessibility_back">Πίσω</string> | ||
| 265 | + <string name="accessibility_history">Ιστορικό</string> | ||
| 266 | + <string name="accessibility_coupon_image">Φωτογραφία εκπτωτικού κουπονιού</string> | ||
| 267 | + <string name="accessibility_expand">Ανεπτυγμένο</string> | ||
| 268 | + <string name="accessibility_collapse">Συμπτυγμένο</string> | ||
| 269 | + | ||
| 264 | <string-array name="coupons_array"> | 270 | <string-array name="coupons_array"> |
| 265 | <item>Κουπόνια</item> | 271 | <item>Κουπόνια</item> |
| 266 | <item>Δώρα</item> | 272 | <item>Δώρα</item> | ... | ... |
-
Please register or login to post a comment