use of com.android.launcher3.views.TopRoundedCornerView in project android_packages_apps_Launcher3 by crdroidandroid.
the class WidgetsFullSheet method onFinishInflate.
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mContent = findViewById(R.id.container);
TopRoundedCornerView springLayout = (TopRoundedCornerView) mContent;
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
int contentLayoutRes = mHasWorkProfile ? R.layout.widgets_full_sheet_paged_view : R.layout.widgets_full_sheet_recyclerview;
layoutInflater.inflate(contentLayoutRes, springLayout, true);
RecyclerViewFastScroller fastScroller = findViewById(R.id.fast_scroller);
mAdapters.get(AdapterHolder.PRIMARY).setup(findViewById(R.id.primary_widgets_list_view));
mAdapters.get(AdapterHolder.SEARCH).setup(findViewById(R.id.search_widgets_list_view));
if (mHasWorkProfile) {
mViewPager = findViewById(R.id.widgets_view_pager);
mViewPager.initParentViews(this);
mViewPager.getPageIndicator().setOnActivePageChangedListener(this);
mViewPager.getPageIndicator().setActiveMarker(AdapterHolder.PRIMARY);
mTabsView = findViewById(R.id.tabs);
findViewById(R.id.tab_personal).setOnClickListener((View view) -> mViewPager.snapToPage(0));
findViewById(R.id.tab_work).setOnClickListener((View view) -> mViewPager.snapToPage(1));
fastScroller.setIsRecyclerViewFirstChildInParent(false);
mAdapters.get(AdapterHolder.WORK).setup(findViewById(R.id.work_widgets_list_view));
} else {
mViewPager = null;
}
layoutInflater.inflate(R.layout.widgets_full_sheet_search_and_recommendations, springLayout, true);
mNoWidgetsView = findViewById(R.id.no_widgets_text);
mSearchAndRecommendationViewHolder = new SearchAndRecommendationViewHolder(findViewById(R.id.search_and_recommendations_container));
TopRoundedCornerView.LayoutParams layoutParams = (TopRoundedCornerView.LayoutParams) mSearchAndRecommendationViewHolder.mContainer.getLayoutParams();
layoutParams.bottomMargin = mSearchAndRecommendationContainerBottomMargin;
mSearchAndRecommendationViewHolder.mContainer.setLayoutParams(layoutParams);
mSearchAndRecommendationsScrollController = new SearchAndRecommendationsScrollController(mHasWorkProfile, mTabsHeight, mSearchAndRecommendationViewHolder, findViewById(R.id.primary_widgets_list_view), mHasWorkProfile ? findViewById(R.id.work_widgets_list_view) : null, findViewById(R.id.search_widgets_list_view), mTabsView, mViewPager, mNoWidgetsView);
fastScroller.setOnFastScrollChangeListener(mSearchAndRecommendationsScrollController);
onRecommendedWidgetsBound();
onWidgetsBound();
mSearchAndRecommendationViewHolder.mSearchBar.initialize(mActivityContext.getPopupDataProvider(), /* searchModeListener= */
this);
setUpEducationViewsIfNeeded();
}
use of com.android.launcher3.views.TopRoundedCornerView in project Neo-Launcher by NeoApplications.
the class WidgetsFullSheet method onFinishInflate.
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mContent = findViewById(R.id.container);
mRecyclerView = findViewById(R.id.widgets_list_view);
mRecyclerView.setAdapter(mAdapter);
mAdapter.setApplyBitmapDeferred(true, mRecyclerView);
TopRoundedCornerView springLayout = (TopRoundedCornerView) mContent;
springLayout.addSpringView(R.id.widgets_list_view);
mRecyclerView.setEdgeEffectFactory(springLayout.createEdgeEffectFactory());
onWidgetsBound();
}
use of com.android.launcher3.views.TopRoundedCornerView in project android_packages_apps_Trebuchet by LineageOS.
the class WidgetsFullSheet method onFinishInflate.
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mContent = findViewById(R.id.container);
mRecyclerView = findViewById(R.id.widgets_list_view);
mRecyclerView.setAdapter(mAdapter);
mAdapter.setApplyBitmapDeferred(true, mRecyclerView);
TopRoundedCornerView springLayout = (TopRoundedCornerView) mContent;
springLayout.addSpringView(R.id.widgets_list_view);
mRecyclerView.setEdgeEffectFactory(springLayout.createEdgeEffectFactory());
onWidgetsBound();
}
Aggregations