Commit 1853ffe8 by 霍志良

fix:UI修改,BUG修复

parent 1005657f
......@@ -11,7 +11,7 @@ ext {
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.44",
"m-im" : "0.0.21.33",
"m-dynamic" : "0.0.7.39",
"m-dynamic" : "0.0.7.40",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28",
......@@ -97,7 +97,7 @@ ext {
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.41",
"m-im" : "0.0.21.33",
"m-dynamic" : "0.0.7.39",
"m-dynamic" : "0.0.7.40",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28",
......
......@@ -179,7 +179,7 @@ public class PublishTrendActivity extends BaseActivity {
titleList.add(new TrendTabEntity("发动态", 0, 0));
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_TREND));
}else{
titleList.add(new TrendTabEntity("提问", 0, 0));
titleList.add(new TrendTabEntity("提问", 0, 0));
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_QUESTION));
}
mTableLayout.setTabData(titleList);
......
......@@ -7,6 +7,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Build;
......@@ -20,6 +21,8 @@ import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.provider.Settings;
import android.text.Editable;
import android.text.InputFilter;
import android.text.InputType;
......@@ -37,6 +40,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.blankj.utilcode.util.DeviceUtils;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.listener.OnResultCallbackListener;
import com.tbruyelle.rxpermissions2.RxPermissions;
......@@ -51,6 +55,7 @@ import com.ydl.ydlcommon.base.BaseFragment;
import com.ydl.ydlcommon.data.http.BaseResponse;
import com.ydl.ydlcommon.router.YdlCommonOut;
import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.DisplayUtils;
import com.ydl.ydlcommon.utils.MoonUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.StringUtils;
......@@ -276,6 +281,11 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
dynamicquestionDraftBean=MMKV.defaultMMKV().decodeParcelable(dynamic_question_save,DynamicDraftBean.class);
}
initView();
// if (TextUtils.equals(type, TYPE_TREND)){
// publish_trend_content_editext.requestFocus();
// }else{
// publish_trend_title_editext.requestFocus();
// }
uiHandler = new Handler();
initEvent();
Intent intent = activity.getIntent();
......@@ -530,21 +540,34 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
if (isCanlayout!=0){
Rect rect=new Rect();
trends_publish_question.getWindowVisibleDisplayFrame(rect);
ll_bottom_img_emoji.layout(0, rect.height()-ll_bottom_img_emoji.getHeight()-96,ll_bottom_img_emoji.getWidth(),rect.height());
if (isMiuiFullScreen()){
ll_bottom_img_emoji.layout(0,
rect.height()-ll_bottom_img_emoji.getHeight()-160,
ll_bottom_img_emoji.getWidth(),rect.height());
}else{
ll_bottom_img_emoji.layout(0,
rect.height()-ll_bottom_img_emoji.getHeight()- getNavigationBarHeight(getContext()),
ll_bottom_img_emoji.getWidth(),rect.height());
}
}
}
});
//默认打开软键盘
trends_publish_question.postDelayed(new Runnable() {
@Override
public void run() {
openSoftKeyBoard();
}
},800);
}
private Integer getNavigationBarHeight( Context context) {
Integer result = 0;
Resources resources = context.getResources();
Integer resourceId =
resources.getIdentifier("navigation_bar_height", "dimen", "android");
if (resourceId > 0) result = resources.getDimensionPixelSize(resourceId);
return result;
}
/*
* 判断小米手机是否开启了全屏手势
* */
private Boolean isMiuiFullScreen(){
return Settings.Global.getInt(getContext().getContentResolver(), "force_fsg_nav_bar", 0) != 0;
}
private void initEvent() {
publish_trend_bottom_img_iv.setOnClickListener(this);
publish_trend_bottom_topic_tv.setOnClickListener(this);
......
......@@ -2,8 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#f6f7f8" />
<stroke
android:width="0.5dp"
android:color="@color/platform_line" />
<corners android:radius="12dp" />
</shape>
......@@ -27,6 +27,7 @@
android:layout_height="wrap_content"
android:textColor="@color/platform_color_333333"
android:text="取消"
android:padding="@dimen/platform_dp_5"
android:id="@+id/mBackIv"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"
......
......@@ -12,7 +12,8 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="50dp">
android:paddingBottom="50dp"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -35,7 +36,7 @@
android:paddingBottom="13dp"
android:textColor="@color/dynamic_text_trend_title_black"
android:textColorHint="#bfbfbf"
android:textSize="24sp"
android:textSize="18sp"
tools:text="标题:说说你的标题:说说你的标题:说说你的困惑标题:说说你的困标题:说说你的困惑标题:说说你的困惑困惑标题:说说你的困惑" />
<View
android:id="@+id/lineTitle"
......@@ -67,7 +68,7 @@
android:paddingLeft="15dp"
android:textColor="@color/dynamic_text_trend_title_black"
android:textColorHint="#bfbfbf"
android:textSize="17sp" />
android:textSize="14sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/publish_trend_img_rcv"
android:layout_width="match_parent"
......@@ -100,7 +101,7 @@
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_marginRight="12dp"
android:gravity="center_vertical"
android:includeFontPadding="false"
android:text="0/1000"
......@@ -112,7 +113,7 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/publish_trend_content_num_tv"
android:layout_marginTop="15dp"
android:layout_marginTop="8dp"
android:background="#eae9e9" />
<androidx.cardview.widget.CardView
......@@ -179,6 +180,5 @@
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/ll_bottom_img_emoji"
android:layout_alignParentBottom="true"
layout="@layout/dynamic_layout_publish_trend_bottom" />
</androidx.constraintlayout.widget.ConstraintLayout>
......@@ -5,7 +5,12 @@
android:layout_height="wrap_content"
android:background="@color/dynamic_white"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#eae9e9"
>
</View>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
......@@ -27,7 +32,7 @@
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:layout_marginLeft="@dimen/platform_dp_32"
android:layout_toRightOf="@+id/publish_trend_bottom_img_iv"
android:padding="3dp"
android:src="@drawable/dynamic_edict_ico_emoji" />
......
......@@ -26,6 +26,7 @@
android:id="@+id/item_publish_cancel_iv"
android:layout_width="22dp"
android:layout_height="22dp"
android:padding="@dimen/platform_dp_5"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/platform_img_delete" />
......
......@@ -57,9 +57,9 @@
>
</TextView>
<TextView
android:layout_width="80dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这一刻你的真实想法"
android:text="这一刻您的真实\n想法"
android:textColor="@color/white"
android:textSize="@dimen/dynamic_text_size_12"
android:layout_marginStart="@dimen/platform_dp_12"
......@@ -94,9 +94,9 @@
>
</TextView>
<TextView
android:layout_width="80dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="数万心理师为您答疑解惑"
android:text="数万心理师为您\n答疑解惑"
android:textColor="@color/white"
android:textSize="@dimen/dynamic_text_size_12"
android:layout_marginStart="@dimen/platform_dp_12"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment