diff --git a/m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java b/m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java index cb30dfc..1265fed 100644 --- a/m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java +++ b/m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java @@ -266,7 +266,7 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie } else { adapter.notifyDataSetChanged(); } - publish_trend_img_rcv.setLayoutManager(new GridLayoutManager(activity, 4)); + publish_trend_img_rcv.setLayoutManager(new GridLayoutManager(activity, 3)); publish_trend_img_rcv.setAdapter(adapter); adapter.setOnItemClickLister(new DynamicPublishImageAdapter.OnItemClickLister() { @Override diff --git a/m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java b/m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java index 1e2f5e1..374440a 100644 --- a/m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java +++ b/m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java @@ -357,11 +357,11 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, vpContent.setCurrentItem(2); } else if (view.getId() == R.id.publish_trend_btn) { ActionCountUtils.Companion.count(YDL_USER_ASK_QUESTIONS_BUTTON_CLICK); - trendsAndQuestionDialog = new TrendsAndQuestionDialog(requireContext(), new TrendsQuestionListener() { - @Override - public void publishTrends() { - //发布动态 - if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(), true)) { + if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(), true)) { + trendsAndQuestionDialog = new TrendsAndQuestionDialog(requireContext(), new TrendsQuestionListener() { + @Override + public void publishTrends() { + //发布动态 Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class); //默认改为今日打卡 Bundle bundle = new Bundle(); @@ -372,12 +372,10 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, startActivity(intent); // PublishTrendActivityTrends.Companion.start(requireContext(),"44","今日打卡"); } - } - @Override - public void publishQuestion() { - //发布问题 - if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(), true)) { + @Override + public void publishQuestion() { + //发布问题 Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class); //默认改为今日打卡 Bundle bundle = new Bundle(); @@ -387,10 +385,9 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, intent.putExtra("bundle", bundle); startActivity(intent); } - } - }); - trendsAndQuestionDialog.show(); - + }); + trendsAndQuestionDialog.show(); + } } else if (view.getId() == R.id.trends_tv_mind_more) { ActionCountUtils.Companion.count(YDL_USER_THOUGHTS_GROUP_MORE_CLICK); Intent intent = new Intent(getActivity(), AllTopicActivity.class); diff --git a/m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml b/m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml index 1dc74ac..51de7e5 100644 --- a/m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml +++ b/m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml @@ -33,137 +33,138 @@ android:textColorHint="#bfbfbf" android:textSize="24sp" tools:text="标题:说说你的标题:说说你的标题:说说你的困惑标题:说说你的困标题:说说你的困惑标题:说说你的困惑困惑标题:说说你的困惑" /> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_below="@id/publish_trend_title_editext" - > - - <EditText - android:id="@+id/publish_trend_content_editext" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@color/dynamic_white" - android:focusable="true" - android:focusableInTouchMode="true" - android:gravity="left|top" - android:hint="1、清晰描述事情的背景及经过\n2、你想寻求哪方面的帮助\n这样更容易获得咨询师准确、专业的解答哦~" - android:includeFontPadding="false" - android:minLines="6" - android:padding="15dp" - android:paddingLeft="15dp" - android:textColor="@color/dynamic_text_trend_title_black" - android:textColorHint="#bfbfbf" - android:textSize="17sp" /> - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/publish_trend_img_rcv" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@+id/publish_trend_content_editext" - android:layout_marginTop="16dp" - android:paddingLeft="@dimen/platform_dp_12" - android:paddingRight="@dimen/platform_dp_12" - android:visibility="gone" /> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@+id/publish_trend_img_rcv" - android:layout_margin="15dp"> - - <TextView - android:id="@+id/publish_trend_bottom_topic_tv" - android:layout_width="wrap_content" - android:layout_height="24dp" - android:background="@drawable/dynamic_bg_topic" - android:gravity="center_vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp" - android:text="# 选择话题" - android:textColor="#999999" - android:textSize="11sp" /> - - <TextView - android:id="@+id/publish_trend_content_num_tv" - android:layout_width="wrap_content" - android:layout_height="24dp" - android:layout_alignParentRight="true" - android:layout_marginRight="15dp" - android:gravity="center_vertical" - android:includeFontPadding="false" - android:text="0/1000" - android:textColor="#b8b8b8" - android:textSize="11sp" /> - - <View - android:id="@+id/line" - android:layout_width="match_parent" - android:layout_height="1dp" - android:layout_below="@+id/publish_trend_content_num_tv" - android:layout_marginTop="15dp" - android:background="@color/platform_new_divide_color" /> - - - - - <androidx.cardview.widget.CardView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@+id/line" - android:layout_marginLeft="1dp" - android:layout_marginTop="15dp" - android:layout_marginRight="1dp" - android:layout_marginBottom="@dimen/platform_dp_1" - android:elevation="1dp" - app:cardCornerRadius="6dp"> - - <RelativeLayout - android:id="@+id/publish_trend_ad_rel" - android:layout_width="match_parent" - android:layout_height="60dp" - android:background="@color/platform_color_F7F7F7" - android:visibility="gone" - tools:visibility="visible"> - - <ImageView - android:id="@+id/publish_trend_ad_iv" - android:layout_width="60dp" - android:layout_height="60dp" - android:layout_centerVertical="true" - android:scaleType="fitXY" - android:src="@drawable/dynamic_default_img" /> - - <ImageView - android:id="@+id/iv_fm" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_marginLeft="18dp" - android:src="@drawable/dynamic_img_trend_fm_play" - android:visibility="gone" - tools:visibility="visible" /> - - <TextView - android:id="@+id/publish_trend_ad_tv" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_marginLeft="15dp" - android:layout_marginRight="15dp" - android:layout_toRightOf="@+id/publish_trend_ad_iv" - android:maxLines="2" - android:text="测测你的童年阴影" - android:textColor="#333" - android:textSize="15sp" /> - </RelativeLayout> - </androidx.cardview.widget.CardView> - - - </RelativeLayout> - - </RelativeLayout> - - + <androidx.core.widget.NestedScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="50dp" + > + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_below="@id/publish_trend_title_editext" + > + + <EditText + android:id="@+id/publish_trend_content_editext" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/dynamic_white" + android:focusable="true" + android:focusableInTouchMode="true" + android:gravity="left|top" + android:hint="1、清晰描述事情的背景及经过\n2、你想寻求哪方面的帮助\n这样更容易获得咨询师准确、专业的解答哦~" + android:includeFontPadding="false" + android:minLines="6" + android:padding="15dp" + android:paddingLeft="15dp" + android:textColor="@color/dynamic_text_trend_title_black" + android:textColorHint="#bfbfbf" + android:textSize="17sp" /> + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/publish_trend_img_rcv" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/publish_trend_content_editext" + android:layout_marginTop="16dp" + android:paddingLeft="@dimen/platform_dp_12" + android:paddingRight="@dimen/platform_dp_12" + android:visibility="gone" /> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/publish_trend_img_rcv" + android:layout_margin="15dp"> + + <TextView + android:id="@+id/publish_trend_bottom_topic_tv" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:background="@drawable/dynamic_bg_topic" + android:gravity="center_vertical" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:text="# 选择话题" + android:textColor="#999999" + android:textSize="11sp" /> + + <TextView + android:id="@+id/publish_trend_content_num_tv" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:layout_alignParentRight="true" + android:layout_marginRight="15dp" + android:gravity="center_vertical" + android:includeFontPadding="false" + android:text="0/1000" + android:textColor="#b8b8b8" + android:textSize="11sp" /> + + <View + android:id="@+id/line" + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_below="@+id/publish_trend_content_num_tv" + android:layout_marginTop="15dp" + android:background="@color/platform_new_divide_color" /> + + <androidx.cardview.widget.CardView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/line" + android:layout_marginLeft="1dp" + android:layout_marginTop="15dp" + android:layout_marginRight="1dp" + android:layout_marginBottom="@dimen/platform_dp_1" + android:elevation="1dp" + app:cardCornerRadius="6dp"> + + <RelativeLayout + android:id="@+id/publish_trend_ad_rel" + android:layout_width="match_parent" + android:layout_height="60dp" + android:background="@color/platform_color_F7F7F7" + android:visibility="gone" + tools:visibility="visible"> + + <ImageView + android:id="@+id/publish_trend_ad_iv" + android:layout_width="60dp" + android:layout_height="60dp" + android:layout_centerVertical="true" + android:scaleType="fitXY" + android:src="@drawable/dynamic_default_img" /> + + <ImageView + android:id="@+id/iv_fm" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_marginLeft="18dp" + android:src="@drawable/dynamic_img_trend_fm_play" + android:visibility="gone" + tools:visibility="visible" /> + + <TextView + android:id="@+id/publish_trend_ad_tv" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_marginLeft="15dp" + android:layout_marginRight="15dp" + android:layout_toRightOf="@+id/publish_trend_ad_iv" + android:maxLines="2" + android:text="测测你的童年阴影" + android:textColor="#333" + android:textSize="15sp" /> + </RelativeLayout> + </androidx.cardview.widget.CardView> + + + </RelativeLayout> + + </RelativeLayout> + </androidx.core.widget.NestedScrollView> </RelativeLayout> <include android:layout_width="match_parent"