feat:调整房间公告位置
This commit is contained in:
@@ -15,8 +15,10 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.chwl.app.avroom.activity.RoomTitleEditActivity;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2;
|
||||
import com.chwl.app.ui.widget.GiftDialog;
|
||||
import com.chwl.app.ui.widget.UserInfoDialog;
|
||||
@@ -117,7 +119,6 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
if (roomFragment instanceof HomePartyRoomFragment) {
|
||||
((HomePartyRoomFragment) roomFragment).onNewIntent(intent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,6 +194,7 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
public void onSetListener() {
|
||||
gameMainBinding.ivRoomNotice.setOnClickListener(this);
|
||||
roomMore.setOnClickListener(this);
|
||||
ivFollowRoom.setOnClickListener(this);
|
||||
// ivRoomShare.setOnClickListener(this);
|
||||
@@ -400,6 +402,12 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
ivFollowRoom.setImageResource(AvRoomDataManager.get().isRoomFans ? R.drawable.room_ic_collect_yes : R.drawable.room_ic_collect_no);
|
||||
|
||||
setIdOnlineData();
|
||||
|
||||
if (AvRoomDataManager.get().getRoomType() != RoomInfo.ROOMTYPE_GAME) {
|
||||
gameMainBinding.ivRoomNotice.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
gameMainBinding.ivRoomNotice.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,6 +429,9 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_room_notice:
|
||||
showRoomIntroduction(AvRoomDataManager.get().isRoomOwner() || AvRoomDataManager.get().isRoomAdmin());
|
||||
break;
|
||||
case R.id.room_more:
|
||||
int gravity = Gravity.END;
|
||||
if(UiUtils.INSTANCE.isRtl(requireContext())){
|
||||
@@ -582,4 +593,22 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void showRoomIntroduction(Boolean modify) {
|
||||
var isModify = modify;
|
||||
RoomInfo info = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (info == null) {
|
||||
return;
|
||||
}
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
isModify = false;
|
||||
}
|
||||
if (isModify) {
|
||||
RoomTitleEditActivity.startForResult(getActivity(), info.getRoomDesc(), info.getIntroduction());
|
||||
} else {
|
||||
DialogFragment dialogFragment =
|
||||
RoomTitleDialogFragment.getInstance(info.getRoomDesc(), info.getIntroduction());
|
||||
dialogFragment.show(requireActivity().getSupportFragmentManager(), "roomTitle");
|
||||
}
|
||||
}
|
||||
}
|
@@ -130,6 +130,16 @@
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/room_ic_collect_no"
|
||||
app:layout_constraintBottom_toBottomOf="@id/space_title_bar"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_room_notice"
|
||||
app:layout_constraintTop_toTopOf="@id/space_title_bar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_room_notice"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/room_ic_notice"
|
||||
app:layout_constraintBottom_toBottomOf="@id/space_title_bar"
|
||||
app:layout_constraintEnd_toStartOf="@id/room_more"
|
||||
app:layout_constraintTop_toTopOf="@id/space_title_bar" />
|
||||
|
||||
|
@@ -280,6 +280,7 @@
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/fr_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -318,6 +318,7 @@
|
||||
tools:text="@string/layout_item_micro_dating_boss_04" />
|
||||
|
||||
<FrameLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/fr_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -339,6 +340,7 @@
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/iv_room_can_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -267,6 +267,7 @@
|
||||
tools:text="@string/layout_item_micro_single_anchor_boss_03" />
|
||||
|
||||
<FrameLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/fr_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -289,6 +290,7 @@
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/iv_room_can_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
Reference in New Issue
Block a user