mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Fix accessiblity issue around work tab
1. Instead of always announcing "Apps list", we now announce "personal apps list" and "work apps list" if tab is there. 2. Fix an issue that "personal" and "work" are announced twice. 3. Work footer is now announced as a group FIX: 71703082 Change-Id: I0240bc04df09a5599540cfe67f0f48156f285548
This commit is contained in:
@@ -25,6 +25,7 @@ import android.graphics.Rect;
|
||||
import android.os.Process;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.Selection;
|
||||
@@ -192,6 +193,19 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
@StringRes int descriptionRes;
|
||||
if (mUsingTabs) {
|
||||
descriptionRes =
|
||||
mViewPager.getNextPage() == 0
|
||||
? R.string.all_apps_button_personal_label
|
||||
: R.string.all_apps_button_work_label;
|
||||
} else {
|
||||
descriptionRes = R.string.all_apps_button_label;
|
||||
}
|
||||
return getContext().getString(descriptionRes);
|
||||
}
|
||||
|
||||
public AllAppsRecyclerView getActiveRecyclerView() {
|
||||
if (!mUsingTabs || mViewPager.getNextPage() == 0) {
|
||||
return mAH[AdapterHolder.MAIN].recyclerView;
|
||||
|
||||
Reference in New Issue
Block a user