修复发布动态,无法选着图片问题

This commit is contained in:
Martin 2024-09-13 12:12:26 +08:00
parent 34aaa61f11
commit 935a5a3ec5
3 changed files with 13 additions and 10 deletions

View File

@ -182,7 +182,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
private List<FrameLayout> mViewList;
private MainHomeLiveViewHolder mHomeLiveViewHolder;
private MainHomeViewHolder mainHomeViewHolder;
// private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder;
private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder;
// private MainMessageViewHolder mainMessageViewHolder;
private NewMainMessageViewHolder newMainMessageViewHolder;
private MainHomeGameViewHolder mMainHomeGameViewHolder;
@ -1240,7 +1240,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
if (updataListBean.getIndex() == 0) {
EventBus.getDefault().post("Updata");
} else if (updataListBean.getIndex() == 1) {
// mMainHomeCommunityViewHolder.loadNewUrl();
mMainHomeCommunityViewHolder.loadNewUrl();
}
}
@ -1259,7 +1259,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override
public void onBackPressed() {
if (isTabClose && isWebClose) {
// mMainHomeCommunityViewHolder.closeFinger();
mMainHomeCommunityViewHolder.closeFinger();
} else {
long curTime = System.currentTimeMillis();
if (curTime - mLastClickBackTime > 2000) {
@ -1318,8 +1318,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
/* mainMessageViewHolder = new MainMessageViewHolder(this, parent);
vh = mainMessageViewHolder;*/
newMainMessageViewHolder = new NewMainMessageViewHolder(this,parent);
vh = newMainMessageViewHolder;
/* newMainMessageViewHolder = new NewMainMessageViewHolder(this,parent);
vh = newMainMessageViewHolder;*/
mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//社区
vh = mMainHomeCommunityViewHolder;
} else if (position == 3) {
mMeViewHolder = new MainMeViewHolder(mContext, parent);
@ -1368,7 +1370,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
}
private void processResult(int resultCode, Intent intent) {
/*if (mMainHomeCommunityViewHolder.mValueCallback == null) {
if (mMainHomeCommunityViewHolder.mValueCallback == null) {
return;
}
if (resultCode == RESULT_OK && intent != null) {
@ -1377,7 +1379,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
} else {
mMainHomeCommunityViewHolder.mValueCallback.onReceiveValue(null);
}
mMainHomeCommunityViewHolder.mValueCallback = null;*/
mMainHomeCommunityViewHolder.mValueCallback = null;
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@ -1396,9 +1398,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
if (dataString != null) {
results = new Uri[]{Uri.parse(dataString)};
}
// mMainHomeCommunityViewHolder.setValueCallback2(results);
mMainHomeCommunityViewHolder.setValueCallback2(results);
} else {
// mMainHomeCommunityViewHolder.setValueCallback2(null);
mMainHomeCommunityViewHolder.setValueCallback2(null);
}
}

View File

@ -78,7 +78,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
viewPager = (ViewPager2) findViewById(R.id.community_viewpager);
fragments = new ArrayList<>();
fragments.add(new MainHomeCommunityFragment(nowMainActivity));
fragments.add(new MainHomeCommunityVideoFragment());
//fragments.add(new MainHomeCommunityVideoFragment());
viewPager.setAdapter(new FragmentStateAdapter(((AppCompatActivity) mContext)) {
@NonNull
@Override

View File

@ -10,6 +10,7 @@
android:id="@+id/indicator"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:visibility="gone"
android:overScrollMode="never"
android:layout_gravity="center"
app:layout_constraintEnd_toEndOf="parent"