Loading res/values/id.xml +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ limitations under the License. --> <resources> <item type="id" name="apps_list_view_work" /> <item type="id" name="view_type_widgets_list" /> <item type="id" name="view_type_widgets_header" /> <item type="id" name="view_type_widgets_search_header" /> Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +17 −0 Original line number Diff line number Diff line Loading @@ -30,11 +30,13 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.os.Parcelable; import android.os.Process; import android.text.Selection; import android.text.SpannableStringBuilder; import android.util.AttributeSet; import android.util.Log; import android.util.SparseArray; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; Loading Loading @@ -133,6 +135,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo private int mHeaderColor; public AllAppsContainerView(Context context) { this(context, null); } Loading Loading @@ -169,6 +172,19 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mAllAppsStore.addUpdateListener(this::onAppsUpdated); } @Override protected void dispatchRestoreInstanceState(SparseArray<Parcelable> sparseArray) { try { // Many slice view id is not properly assigned, and hence throws null // pointer exception in the underneath method. Catching the exception // simply doesn't restore these slice views. This doesn't have any // user visible effect because because we query them again. super.dispatchRestoreInstanceState(sparseArray); } catch (Exception e) { Log.e("AllAppsContainerView", "restoreInstanceState viewId = 0", e); } } /** * Sets the long click listener for icons */ Loading Loading @@ -436,6 +452,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo setupWorkToggle(); mAH[AdapterHolder.MAIN].setup(mViewPager.getChildAt(0), mPersonalMatcher); mAH[AdapterHolder.WORK].setup(mViewPager.getChildAt(1), mWorkMatcher); mAH[AdapterHolder.WORK].recyclerView.setId(R.id.apps_list_view_work); mViewPager.getPageIndicator().setActiveMarker(AdapterHolder.MAIN); findViewById(R.id.tab_personal) .setOnClickListener((View view) -> { Loading Loading
res/values/id.xml +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ limitations under the License. --> <resources> <item type="id" name="apps_list_view_work" /> <item type="id" name="view_type_widgets_list" /> <item type="id" name="view_type_widgets_header" /> <item type="id" name="view_type_widgets_search_header" /> Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +17 −0 Original line number Diff line number Diff line Loading @@ -30,11 +30,13 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.os.Parcelable; import android.os.Process; import android.text.Selection; import android.text.SpannableStringBuilder; import android.util.AttributeSet; import android.util.Log; import android.util.SparseArray; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; Loading Loading @@ -133,6 +135,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo private int mHeaderColor; public AllAppsContainerView(Context context) { this(context, null); } Loading Loading @@ -169,6 +172,19 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mAllAppsStore.addUpdateListener(this::onAppsUpdated); } @Override protected void dispatchRestoreInstanceState(SparseArray<Parcelable> sparseArray) { try { // Many slice view id is not properly assigned, and hence throws null // pointer exception in the underneath method. Catching the exception // simply doesn't restore these slice views. This doesn't have any // user visible effect because because we query them again. super.dispatchRestoreInstanceState(sparseArray); } catch (Exception e) { Log.e("AllAppsContainerView", "restoreInstanceState viewId = 0", e); } } /** * Sets the long click listener for icons */ Loading Loading @@ -436,6 +452,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo setupWorkToggle(); mAH[AdapterHolder.MAIN].setup(mViewPager.getChildAt(0), mPersonalMatcher); mAH[AdapterHolder.WORK].setup(mViewPager.getChildAt(1), mWorkMatcher); mAH[AdapterHolder.WORK].recyclerView.setId(R.id.apps_list_view_work); mViewPager.getPageIndicator().setActiveMarker(AdapterHolder.MAIN); findViewById(R.id.tab_personal) .setOnClickListener((View view) -> { Loading