项目:FMTech
文件:SimpleCardClusterModule.java
public final void bindView(View paramView)
{
Document localDocument = ((Data)this.mModuleData).dfeList.mContainerDocument;
if (!TextUtils.isEmpty(((Data)this.mModuleData).sectionMetadata.header)) {}
for (String str1 = ((Data)this.mModuleData).sectionMetadata.header; (paramView instanceof CardClusterModuleLayout); str1 = localDocument.mDocument.title)
{
CardClusterModuleLayout localCardClusterModuleLayout = (CardClusterModuleLayout)paramView;
String str3 = UiUtils.getMoreResultsStringForCluster(this.mContext,localDocument,localCardClusterModuleLayout.getMaxItemsInLayout(false),this,((Data)this.mModuleData).sectionMetadata.browseUrl,true);
int k = ((Data)this.mModuleData).dfeList.getBackendId();
boolean bool = ((Data)this.mModuleData).supportsTwoRows;
localCardClusterModuleLayout.bind(this,k,str1,null,str3,bool,this);
return;
}
CardClusterModuleLayoutV2 localCardClusterModuleLayoutV2 = (CardClusterModuleLayoutV2)paramView;
int i = ((Data)this.mModuleData).dfeList.getBackendId();
String str2 = UiUtils.getMoreResultsStringForCluster(this.mContext,localCardClusterModuleLayoutV2.getMaxItemsPerPage(),true);
int j = ((Data)this.mModuleData).cardLayoutResId;
ClusterContentConfiguratorRepository localClusterContentConfiguratorRepository = this.mClusterConfiguratorRepository;
RecyclerView.RecycledViewPool localRecycledViewPool = this.mRecycledViewPool;
Bundle localBundle = ((Data)this.mModuleData).clusterState;
PlayStoreUiElementNode localPlayStoreUiElementNode = getParentNode();
byte[] arrayOfByte = localDocument.mDocument.serverLogsCookie;
localCardClusterModuleLayoutV2.bind(i,str2,j,localClusterContentConfiguratorRepository,localRecycledViewPool,localBundle,localPlayStoreUiElementNode,arrayOfByte);
}
项目:FMTech
文件:CombinedTitleModule.java
public final void init(Context paramContext,FinskyModule.FinskyModuleController paramFinskyModuleController,DfeToc paramDfeToc,DfeApi paramDfeApi1,DfeApi paramDfeApi2,BitmapLoader paramBitmapLoader,NavigationManager paramNavigationManager,PageFragment paramPageFragment,String paramString1,String paramString2,Libraries paramLibraries,boolean paramBoolean1,String paramString3,boolean paramBoolean2,RecyclerView.RecycledViewPool paramRecycledViewPool,ClusterContentConfiguratorRepository paramClusterContentConfiguratorRepository,PlayStoreUiElementNode paramPlayStoreUiElementNode)
{
super.init(paramContext,paramFinskyModuleController,paramDfeToc,paramDfeApi1,paramDfeApi2,paramBitmapLoader,paramNavigationManager,paramPageFragment,paramString1,paramString2,paramLibraries,paramBoolean1,paramString3,paramBoolean2,paramRecycledViewPool,paramClusterContentConfiguratorRepository,paramPlayStoreUiElementNode);
this.mTitleModule = new TitleModule();
this.mDiscoveryBarModule = new DiscoveryBarModule();
this.mWarningMessageModule = new WarningMessageModule();
this.mNestedModules = new ArrayList();
this.mNestedModules.add(this.mTitleModule);
this.mNestedModules.add(this.mDiscoveryBarModule);
this.mNestedModules.add(this.mWarningMessageModule);
for (int i = 0;; i++)
{
int j = this.mNestedModules.size();
if (i >= j) {
break;
}
((FinskyModule)this.mNestedModules.get(i)).init(paramContext,paramPlayStoreUiElementNode);
}
}
项目:FMTech
文件:FinskyModule.java
public void init(Context paramContext,FinskyModuleController paramFinskyModuleController,PlayStoreUiElementNode paramPlayStoreUiElementNode)
{
this.mContext = paramContext;
this.mFinskyModuleController = paramFinskyModuleController;
this.mDfeToc = paramDfeToc;
this.mDfeApi = paramDfeApi1;
this.mSocialDfeApi = paramDfeApi2;
this.mBitmapLoader = paramBitmapLoader;
this.mNavigationManager = paramNavigationManager;
this.mContainerFragment = paramPageFragment;
this.mDetailsUrl = paramString1;
this.mContinueUrl = paramString2;
this.mLibraries = paramLibraries;
this.mUseWideLayout = paramBoolean1;
this.mRevealTransitionCoverName = paramString3;
this.mIsRevealTransitionRunning = paramBoolean2;
this.mRecycledViewPool = paramRecycledViewPool;
this.mClusterConfiguratorRepository = paramClusterContentConfiguratorRepository;
this.mParentNode = paramPlayStoreUiElementNode;
}
项目:FMTech
文件:CardClusterModuleLayoutV2.java
public final void bind(int paramInt1,View.OnClickListener paramOnClickListener,int paramInt2,ClusterContentBinder paramClusterContentBinder,Bundle paramBundle,PlayStoreUiElementNode paramPlayStoreUiElementNode,byte[] paramArrayOfByte)
{
Resources localResources = getResources();
int i = Math.max(localResources.getDimensionPixelSize(2131492956),ModuleMarginItemDecoration.getDefaultSideMargin(localResources,localResources.getBoolean(2131427334)));
setCardContentHorizontalPadding(i);
showHeader(paramInt1,paramOnClickListener,i);
createContent(paramClusterContentBinder,paramClusterContentConfiguratorRepository.getClusterContentConfigurator(paramInt2),UiUtils.getFeaturedGridColumnCount(localResources,1.0D),paramBundle,paramPlayStoreUiElementNode,paramArrayOfByte);
}
项目:FMTech
文件:CardRecyclerViewAdapterV2.java
private void initializeHeapRecycledPool(int paramInt)
{
if (this.mHeapRecycledPool == null) {
this.mHeapRecycledPool = new RecyclerView.RecycledViewPool();
}
this.mHeapRecycledPool.setMaxRecycledViews(paramInt,50);
}
项目:agera
文件:RowHandler.java
private RowHandler(@NonNull final RecycledViewPool pool,@NonNull final Function<TRow,Long> stableId,RepositoryPresenter<TRow>> presenter,LayoutManager> layoutManager) {
this.stableId = checkNotNull(stableId);
this.presenter = checkNotNull(presenter);
this.layoutManager = layoutManager;
this.itemRowStates = new IdentityHashMap<>();
this.previousStableIds = new IdentityHashMap<>();
this.adapterRepositories = new IdentityHashMap<>();
this.startedAdapters = new HashSet<>();
this.pool = pool;
}
项目:agera
文件:RowHandler.java
@NonNull
static <TRow> RowHandler<TRow> rowBinder(
@NonNull final RecycledViewPool pool,LayoutManager> layoutManager,Long> stableIdFunction,RepositoryPresenter<TRow>> presenterFromView) {
return new RowHandler<>(pool,stableIdFunction,presenterFromView,layoutManager);
}
项目:android_packages_apps_tv
文件:ProgramTableAdapter.java
public ProgramTableAdapter(Context context,ProgramManager programManager,ProgramGuide programGuide) {
mContext = context;
mAccessibilityManager =
(AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
mTvInputManagerHelper = TvApplication.getSingletons(context).getTvInputManagerHelper();
if (CommonFeatures.DVR.isEnabled(context)) {
mDvrManager = TvApplication.getSingletons(context).getDvrManager();
mDvrDataManager = TvApplication.getSingletons(context).getDvrDataManager();
} else {
mDvrManager = null;
mDvrDataManager = null;
}
mProgramManager = programManager;
mProgramGuide = programGuide;
Resources res = context.getResources();
mChannelLogoWidth = res.getDimensionPixelSize(
R.dimen.program_guide_table_header_column_channel_logo_width);
mChannelLogoHeight = res.getDimensionPixelSize(
R.dimen.program_guide_table_header_column_channel_logo_height);
mImageWidth = res.getDimensionPixelSize(
R.dimen.program_guide_table_detail_image_width);
mImageHeight = res.getDimensionPixelSize(
R.dimen.program_guide_table_detail_image_height);
mProgramTitleForNoInformation = res.getString(
R.string.program_title_for_no_information);
mProgramTitleForBlockedChannel = res.getString(
R.string.program_title_for_blocked_channel);
mChannelTextColor = res.getColor(
R.color.program_guide_table_header_column_channel_number_text_color,null);
mChannelBlockedTextColor = res.getColor(
R.color.program_guide_table_header_column_channel_number_blocked_text_color,null);
mDetailTextColor = res.getColor(
R.color.program_guide_table_detail_title_text_color,null);
mDetailGrayedTextColor = res.getColor(
R.color.program_guide_table_detail_title_grayed_text_color,null);
mAnimationDuration =
res.getInteger(R.integer.program_guide_table_detail_fade_anim_duration);
mDetailPadding = res.getDimensionPixelOffset(
R.dimen.program_guide_table_detail_padding);
mProgramRecordableText = res.getString(R.string.dvr_epg_program_recordable);
mRecordingScheduledText = res.getString(R.string.dvr_epg_program_recording_scheduled);
mRecordingConflictText = res.getString(R.string.dvr_epg_program_recording_conflict);
mRecordingFailedText = res.getString(R.string.dvr_epg_program_recording_failed);
mRecordingInProgressText = res.getString(R.string.dvr_epg_program_recording_in_progress);
mDvrPaddingStartWithTrack = res.getDimensionPixelOffset(
R.dimen.program_guide_table_detail_dvr_margin_start);
mDvrPaddingStartWithOutTrack = res.getDimensionPixelOffset(
R.dimen.program_guide_table_detail_dvr_margin_start_without_track);
int episodeTitleSize = res.getDimensionPixelSize(
R.dimen.program_guide_table_detail_episode_title_text_size);
ColorStateList episodeTitleColor = ColorStateList.valueOf(
res.getColor(R.color.program_guide_table_detail_episode_title_text_color,null));
mEpisodeTitleStyle = new TextAppearanceSpan(null,episodeTitleSize,episodeTitleColor,null);
mCriticScoreViews = new ArrayList<>();
mRecycledViewPool = new RecycledViewPool();
mRecycledViewPool.setMaxRecycledViews(R.layout.program_guide_table_item,context.getResources().getInteger(
R.integer.max_recycled_view_pool_epg_table_item));
mProgramManager.addListener(new ProgramManager.ListenerAdapter() {
@Override
public void onChannelsUpdated() {
update();
}
});
update();
mProgramManager.addTableEntryChangedListener(this);
}
项目:FMTech
文件:HighlightsPagerAdapter.java
public HighlightsTab(int paramInt,DfeApi paramDfeApi,Context paramContext,LayoutInflater paramLayoutInflater,ClusterContentConfigurator paramClusterContentConfigurator,DfeList paramDfeList,ObjectMap paramObjectMap)
{
this.mPageLogicalIndex = paramInt;
this.mDfeApi = paramDfeApi;
this.mContext = paramContext;
this.mLayoutInflater = paramLayoutInflater;
this.mBitmapLoader = paramBitmapLoader;
this.mNavigationManager = paramNavigationManager;
this.mHighlightsConfigurator = paramClusterContentConfigurator;
this.mHeapRecycledPool = paramRecycledViewPool;
this.mParentNode = paramPlayStoreUiElementNode;
int j;
label124:
int k;
if ((paramObjectMap != null) && (paramObjectMap.containsKey("HighlightsTab.ScrollState")))
{
this.mScrollState = ((Bundle)paramObjectMap.get("HighlightsTab.ScrollState"));
int i = paramNavigationManager.getCurrentPageType();
if ((!FinskyApp.get().getExperiments().isEnabled(12605163L)) && (!((Boolean)G.preventTabPreloadingOnHomePage.get()).booleanValue())) {
break label198;
}
j = 1;
if (i != 1) {
break label204;
}
k = 1;
label133:
if ((j == 0) || (k == 0)) {
break label210;
}
}
label198:
label204:
label210:
for (boolean bool = true;; bool = false)
{
this.mDoNotPrefetchExtraTabs = bool;
this.mHandler = new Handler(Looper.getMainLooper());
this.mDfeList = paramDfeList;
if (!this.mDoNotPrefetchExtraTabs) {
requestData();
}
return;
this.mScrollState = new Bundle();
break;
j = 0;
break label124;
k = 0;
break label133;
}
}
项目:FMTech
文件:PlayClusterViewContentV2.java
public final void createContent(ClusterContentBinder paramClusterContentBinder,int paramInt,boolean paramBoolean,int[] paramArrayOfInt)
{
super.bindView();
this.mClusterContentBinder = paramClusterContentBinder;
this.mChildWidthMultiplier = paramClusterContentConfigurator.getChildWidthMultiplier();
this.mItemsPerPage = Math.round(paramInt / this.mChildWidthMultiplier);
this.mSupportsHorizontallyCenteredContent = paramBoolean;
this.mImageTypeSequence = paramArrayOfInt;
this.mClusterContentConfigurator = paramClusterContentConfigurator;
boolean bool1;
boolean bool2;
label90:
RecyclerView.Adapter localAdapter;
if (this.mClusterContentBinder.getAvailableChildCount() > this.mItemsPerPage)
{
bool1 = true;
this.mUseTrailingChildren = bool1;
if (paramClusterContentConfigurator.getChildPeekingAmount() <= 0.0D) {
break label205;
}
bool2 = true;
this.mHasPeekingChild = bool2;
this.mPrimaryAspectRatio = this.mClusterContentConfigurator.getPrimaryChildAspectRatio(this.mClusterContentBinder);
localAdapter = getAdapter();
if (localAdapter != null) {
break label211;
}
setAdapter(new ClusterRecyclerViewAdapter());
setRecycledViewPool(paramRecycledViewPool);
}
for (;;)
{
if ((this.mClusterContentBinder instanceof InfiniteWrappingClusterContentBinder)) {
scrollToPosition(1 + ((InfiniteWrappingClusterContentBinder)this.mClusterContentBinder).getDefaultFirstVisibleChildPosition());
}
if (paramBundle != null)
{
this.mHasPreloadedCovers = true;
scrollToPosition(paramBundle.getInt("PlayClusterViewContentV2.recyclerViewScrollPosition",-1));
}
preloadImages(true);
return;
bool1 = false;
break;
label205:
bool2 = false;
break label90;
label211:
localAdapter.mObservable.notifyChanged();
onDataChanged();
scrollToPosition(0);
this.mHasPreloadedCovers = false;
}
}
项目:FMTech
文件:PlayCardClusterViewV2.java
public final void createContent(ClusterContentBinder paramClusterContentBinder,byte[] paramArrayOfByte)
{
configureLogging(paramArrayOfByte,paramPlayStoreUiElementNode);
this.mContent.createContent(paramClusterContentBinder,paramClusterContentConfigurator,paramInt,false,getImageTypePreference());
}
项目:agera
文件:NotesFragment.java
@Override
public void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
notesStore = notesStore(getContext().getApplicationContext());
pool = new RecycledViewPool();
final RowHandler<NoteGroup> rowHandler = rowBinder(pool,(r) -> new LinearLayoutManager(getContext(),HORIZONTAL,false),NoteGroup::getId,(r) ->
dataBindingRepositoryPresenterOf(Note.class)
.layout(R.layout.text_layout)
.itemId(BR.note)
.handler(BR.click,(Receiver<Note>) (note) -> {
final EditText editText = new EditText(getContext());
editText.setId(R.id.edit);
editText.setText(note.getNote());
new AlertDialog.Builder(getContext())
.setTitle(R.string.edit_note)
.setView(editText)
.setPositiveButton(R.string.edit,(d,i) ->
notesStore.updateNote(note,editText.getText().toString()))
.create().show();
})
.handler(BR.longClick,(Receiver<Note>) notesStore::deleteNote)
.stableIdForItem(Note::getId)
.collectionId(BR.noteGroup)
.forCollection(NoteGroup::getNotes));
adapter = repositoryAdapter()
.addLayout(layout(R.layout.header))
.add(notesStore.getNotesRepository(),repositoryPresenterOf(NoteGroup.class)
.layout(R.layout.note_group_layout)
.stableIdForItem(NoteGroup::getId)
.bindWith(rowHandler)
.recycleWith(rowHandler)
.forList())
.addItem(getInstance().format(new Date()),dataBindingRepositoryPresenterOf(String.class)
.layout(R.layout.footer)
.itemId(BR.string)
.forItem())
.build();
adapter.setHasStableIds(true);
final DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
backgroundRepository = repositoryWithInitialValue(Result.<Bitmap>absent())
.observe()
.onUpdatesPerLoop()
.goTo(networkExecutor)
.getFrom(() -> "http://www.gravatar.com/avatar/4df6f4fe5976df17deeea19443d4429d?s="
+ Math.max(displayMetrics.heightPixels,displayMetrics.widthPixels))
.transform(url -> httpGetRequest(url).compile())
.attemptTransform(httpFunction()).orEnd(Result::failure)
.goTo(calculationExecutor)
.thenTransform(input -> {
final byte[] body = input.getBody();
return absentIfNull(decodeByteArray(body,body.length));
})
.onDeactivation(SEND_INTERRUPT)
.compile();
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。