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

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

View File

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