huyuguo лет назад: 5
Родитель
Сommit
918f6665be

+ 62 - 13
app/src/main/java/com/electric/chargingpile/activity/ChatContentListActivity.java

@ -35,6 +35,7 @@ import com.electric.chargingpile.data.ChatRecommendBean;
35 35
import com.electric.chargingpile.data.TopicDetailBeanLab;
36 36
import com.electric.chargingpile.data.UserPageBeanLab;
37 37
import com.electric.chargingpile.fragment.ChatPhotoFragment;
38
import com.electric.chargingpile.fragment.CommonDialogFragment;
38 39
import com.electric.chargingpile.iview.ChatVerticalViewPager;
39 40
import com.electric.chargingpile.manager.ProfileManager;
40 41
import com.electric.chargingpile.util.CircleTransform;
@ -82,6 +83,8 @@ public class ChatContentListActivity extends AppCompatActivity {
82 83
    private boolean isFirstShowNetworkDialog = true;
83 84
    private ChatVerticalViewPager verticalViewPager;
84 85
    private static final int UPDATE_VERTICAL_VIEW_PAGER_SCROLL = 1;
86
    private int chatContentPosition;
87
85 88
86 89
    private Handler handler = new Handler() {
87 90
        @Override
@ -130,6 +133,17 @@ public class ChatContentListActivity extends AppCompatActivity {
130 133
        GSYVideoManager.releaseAllVideos();
131 134
    }
132 135
136
    @Override
137
    public void onBackPressed() {
138
        final ChatContentFragment chatContentFragment = (ChatContentFragment) chatContentAdapter.map.get(chatContentPosition + "");
139
        if (chatContentFragment.allCommentsContainer.getVisibility() == View.GONE) {
140
            finish();
141
        } else {
142
            chatContentFragment.allCommentsContainer.setVisibility(View.GONE);
143
        }
144
145
    }
146
133 147
    private void initView() {
134 148
        isFirstPlay = true;
135 149
        screenWidth = ScreenUtils.getScreenWidth(ChatContentListActivity.this);
@ -151,6 +165,7 @@ public class ChatContentListActivity extends AppCompatActivity {
151 165
                    isFirstPlay = false;
152 166
                    play(position);
153 167
                }
168
                chatContentPosition = position;
154 169
            }
155 170
156 171
            @Override
@ -271,12 +286,13 @@ public class ChatContentListActivity extends AppCompatActivity {
271 286
        private ConstraintLayout statusBar;
272 287
        private TextView commentNumber;
273 288
        private ConstraintLayout allComments;
274
        private ConstraintLayout allCommentsContainer;
289
        public ConstraintLayout allCommentsContainer;
275 290
        private ViewPager photoPager;
276 291
        private ConstraintLayout bottomView;
277 292
        private TextView navTitle;
278 293
        private List<ChatPhotoFragment> chatPhotoFragments;
279 294
        private ChatPhotoFragmentPagerAdapter chatPhotoFragmentPagerAdapter;
295
        private TextView bCommentContent;
280 296
281 297
        public static ChatContentFragment newInstance(int index, String from) {
282 298
            ChatContentFragment fragment = new ChatContentFragment();
@ -405,11 +421,18 @@ public class ChatContentListActivity extends AppCompatActivity {
405 421
                    doLike(bean);
406 422
                    break;
407 423
                case R.id.userInfo: // 点击用户头像,跳转个人中心
424
                    if (playIcon != null) {
425
                        playIcon.setVisibility(View.VISIBLE);
426
                    }
408 427
                    intent = new Intent(getContext(), UserPageActivity.class);
409 428
                    intent.putExtra("targetUserId", bean.addUserId + "");
410 429
                    getContext().startActivity(intent);
411 430
                    break;
412 431
                case R.id.topicInfo: // 跳转话题列表页
432
                    if (playIcon != null) {
433
                        playIcon.setVisibility(View.VISIBLE);
434
                    }
435
413 436
                    intent = new Intent(getContext(), TopicDetailActivity.class);
414 437
                    intent.putExtra("topicId", bean.topicId);
415 438
                    getContext().startActivity(intent);
@ -437,7 +460,21 @@ public class ChatContentListActivity extends AppCompatActivity {
437 460
                    allCommentsContainer.setVisibility(View.GONE);
438 461
                    break;
439 462
                case R.id.bWriteComment: // 写评论
463
                    CommonDialogFragment commonDialogFragment = CommonDialogFragment.newInstance(bCommentContent.getText().toString());
464
                    commonDialogFragment.show(getChildFragmentManager(), "CommonDialogFragment");
465
466
                    commonDialogFragment.setOnCommonDialogFragmentListener(new CommonDialogFragment.OnCommonDialogFragmentListener() {
467
                        @Override
468
                        public void updateComment(String comment) {
469
                            bCommentContent.setText(comment);
470
                        }
440 471
472
                        @Override
473
                        public void publish() {
474
                            Log.d(TAG, "publish: xxxxxxxxxxxxxx");
475
476
                        }
477
                    });
441 478
                    break;
442 479
            }
443 480
        }
@ -447,7 +484,7 @@ public class ChatContentListActivity extends AppCompatActivity {
447 484
                @Override
448 485
                public void run() {
449 486
                    Message message = new Message();
450
                    message.what = UPDATE_VERTICAL_VIEW_PAGER_SCROLL;
487
                    message.what = UPDATE_VERTICAL_VIEW_PAGER_SCROLL; // 设置是否可以上下滑动
451 488
                    message.obj = isScroll;
452 489
                    handler.sendMessage(message);
453 490
                }
@ -473,6 +510,7 @@ public class ChatContentListActivity extends AppCompatActivity {
473 510
474 511
            allCommentsContainer = rootView.findViewById(R.id.allCommentsContainer);
475 512
            allComments = rootView.findViewById(R.id.allComments);
513
            bCommentContent = rootView.findViewById(R.id.bCommentContent);
476 514
477 515
            ConstraintLayout.LayoutParams statusBarParams = (ConstraintLayout.LayoutParams) statusBar.getLayoutParams();
478 516
            statusBarParams.height = statusBarHeight;
@ -522,10 +560,14 @@ public class ChatContentListActivity extends AppCompatActivity {
522 560
            if (bean.topicId == 0) {
523 561
                topicInfo.setVisibility(View.GONE);
524 562
            } else {
525
                topicTitle.setText(bean.topicName);
526 563
                topicInfo.setVisibility(View.VISIBLE);
527 564
            }
528 565
566
            topicTitle.setMaxWidth(screenWidth - DensityUtil.dip2px(getContext(), 100));
567
568
            msg.setText("都是老款附件是打开了附近看落地时间付款了的设计费考虑到司法鉴定所可是大家放开了世纪东方可是大家开飞机圣诞快乐风骚的收到了快捷方式迪克辣鸡福克斯第六届逢狼时刻大嫁风尚了会计师的反馈了十多斤狂蜂浪蝶涉及开发了十多斤圣诞快乐附件是大立科技发");
569
            topicTitle.setText("打扫房间莱克斯顿及反馈了十多斤放开了时代峻峰看电视剧范德萨看来酒发牢骚的sfsdsdfdsf");
570
529 571
            if (bean.commentNums == 0) {
530 572
                commentNumber.setText("");
531 573
            } else {
@ -640,15 +682,8 @@ public class ChatContentListActivity extends AppCompatActivity {
640 682
641 683
            chatPhotoFragments = new ArrayList<>();
642 684
            for (String url : bean.imgUrls) {
643
//                url = "http://cdn-fs.touchev.com/d/file/liaoliao/img/2019/6/12/2019061630959282895829A-3CD3-4A25-8D6D-C18D1D0240DB000.jpeg!w480";
644
                if (url.endsWith("!w480")) {
645
                    ChatPhotoFragment fragment = ChatPhotoFragment.newInstance(url.substring(0, url.length() - 5));
646
                    chatPhotoFragments.add(fragment);
647
                } else {
648
                    ChatPhotoFragment fragment = ChatPhotoFragment.newInstance(url);
649
                    chatPhotoFragments.add(fragment);
650
                }
651
685
                ChatPhotoFragment fragment = ChatPhotoFragment.newInstance(url);
686
                chatPhotoFragments.add(fragment);
652 687
            }
653 688
654 689
            chatPhotoFragmentPagerAdapter = new ChatPhotoFragmentPagerAdapter(getChildFragmentManager(), chatPhotoFragments);
@ -670,13 +705,27 @@ public class ChatContentListActivity extends AppCompatActivity {
670 705
        }
671 706
672 707
        private void showPhotos() {
673
674 708
        }
675 709
710
676 711
        private void setVideoAllCallBack() {
677 712
            videoPlayer.setVideoAllCallBack(new VideoAllCallBack() {
678 713
                @Override
679 714
                public void onAutoComplete(String s, Object... objects) {
715
716
                    NetworkUtils.NetworkType networkType = NetworkUtils.getNetworkType();
717
                    switch (networkType) {
718
                        case NETWORK_2G:
719
                        case NETWORK_3G:
720
                        case NETWORK_4G:
721
                            if (ProfileManager.getInstance().getMakeSureNetworkForView(getContext())) {
722
                                videoPlayer.startPlayLogic();
723
                            }
724
                            break;
725
                        default:
726
                            videoPlayer.startPlayLogic();
727
                            break;
728
                    }
680 729
                    if (ProfileManager.getInstance().getMakeSureNetworkForView(getContext())) {
681 730
                        videoPlayer.startPlayLogic();
682 731
                    }

+ 4 - 0
app/src/main/java/com/electric/chargingpile/fragment/ChatPhotoFragment.java

@ -61,6 +61,10 @@ public class ChatPhotoFragment extends Fragment {
61 61
        super.onPause();
62 62
    }
63 63
64
    @Override
65
    public void onDestroy() {
66
        super.onDestroy();
67
    }
64 68
65 69
    private void initView(View rootView, String url) {
66 70
        photoView = rootView.findViewById(R.id.photoView);

+ 126 - 0
app/src/main/java/com/electric/chargingpile/fragment/CommonDialogFragment.java

@ -0,0 +1,126 @@
1
package com.electric.chargingpile.fragment;
2
3
import android.app.Dialog;
4
import android.graphics.Color;
5
import android.os.Bundle;
6
import android.support.v4.app.DialogFragment;
7
import android.text.Editable;
8
import android.text.TextWatcher;
9
import android.util.Log;
10
import android.view.Gravity;
11
import android.view.View;
12
import android.view.Window;
13
import android.view.WindowManager;
14
import android.view.inputmethod.InputMethodManager;
15
import android.widget.EditText;
16
import android.widget.TextView;
17
18
import com.electric.chargingpile.R;
19
import com.electric.chargingpile.iview.SoftKeyBoardListener;
20
21
public class CommonDialogFragment extends DialogFragment implements View.OnClickListener {
22
    private static final String TAG = "CommonDialogFragment";
23
    private static final String ARG_COMMENT = "comment";
24
    private Dialog dialogFragment;
25
    private EditText editText;
26
    private TextView send;
27
    public OnCommonDialogFragmentListener commonDialogFragmentListener;
28
29
    public static CommonDialogFragment newInstance(String comment) {
30
        CommonDialogFragment dialogFragment = new CommonDialogFragment();
31
        Bundle args = new Bundle();
32
        args.putString(ARG_COMMENT, comment);
33
        dialogFragment.setArguments(args);
34
        return dialogFragment;
35
    }
36
37
    @Override
38
    public Dialog onCreateDialog(Bundle savedInstanceState) {
39
        final String comment = getArguments().getString(ARG_COMMENT);
40
41
        dialogFragment = new Dialog(getActivity(), R.style.BottomDialog);
42
        // 外部点击设置为可取消
43
        dialogFragment.setCancelable(true);
44
        dialogFragment.setCanceledOnTouchOutside(true);
45
46
        dialogFragment.requestWindowFeature(Window.FEATURE_NO_TITLE);
47
        dialogFragment.setContentView(R.layout.fragment_common_dialog);
48
49
        Window window = dialogFragment.getWindow();
50
        WindowManager.LayoutParams layoutParams = window.getAttributes();
51
        // 布局属性位于整个窗口底部
52
        layoutParams.gravity = Gravity.BOTTOM;
53
        // 布局属性宽度填充整个窗口,默认是有margin的
54
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
55
        window.setAttributes(layoutParams);
56
57
        editText = dialogFragment.findViewById(R.id.dialogEdit);
58
        editText.setText(comment);
59
        editText.setSelection(comment.length());
60
        editText.addTextChangedListener(new TextWatcher() {
61
            @Override
62
            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
63
            }
64
65
            @Override
66
            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
67
                String comment = charSequence.toString().trim();
68
                if (comment.length() > 0) {
69
                    send.setTextColor(Color.parseColor("#00EDB2"));
70
                } else {
71
                    send.setTextColor(Color.parseColor("#7e7e7e"));
72
                }
73
                if (commonDialogFragmentListener != null) {
74
                    commonDialogFragmentListener.updateComment(comment);
75
                }
76
            }
77
78
            @Override
79
            public void afterTextChanged(Editable editable) {
80
81
            }
82
        });
83
        send = dialogFragment.findViewById(R.id.dialogPublish);
84
        send.setOnClickListener(this);
85
86
        //打开软键盘
87
        InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(getContext().INPUT_METHOD_SERVICE);
88
        imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
89
90
91
        SoftKeyBoardListener.setListener(getActivity(), new SoftKeyBoardListener.OnSoftKeyBoardChangeListener() {
92
            @Override
93
            public void keyBoardShow(int height) {
94
95
            }
96
97
            @Override
98
            public void keyBoardHide(int height) {
99
                dialogFragment.dismiss();
100
            }
101
        });
102
        return dialogFragment;
103
    }
104
105
    @Override
106
    public void onClick(View view) {
107
        switch (view.getId()) {
108
            case R.id.dialogPublish:
109
                if (commonDialogFragmentListener != null && editText.getText().toString().trim().length() > 0) {
110
                    dismiss();
111
                    commonDialogFragmentListener.publish();
112
                }
113
                break;
114
        }
115
    }
116
117
    public interface OnCommonDialogFragmentListener {
118
        void updateComment(String comment);
119
        void publish();
120
    }
121
122
    public void setOnCommonDialogFragmentListener(OnCommonDialogFragmentListener listener) {
123
        this.commonDialogFragmentListener = listener;
124
    }
125
126
}

+ 62 - 0
app/src/main/java/com/electric/chargingpile/iview/SoftKeyBoardListener.java

@ -0,0 +1,62 @@
1
package com.electric.chargingpile.iview;
2
3
import android.app.Activity;
4
import android.graphics.Rect;
5
import android.view.View;
6
import android.view.ViewTreeObserver;
7
8
public class SoftKeyBoardListener {
9
    private View rootView;  //activity的根视图
10
    int rootViewVisibleHeight;  //纪录根视图的显示高度
11
    private OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener;
12
    public SoftKeyBoardListener(Activity activity) {
13
        //获取activity的根视图
14
        rootView = activity.getWindow().getDecorView();
15
        //监听视图树中全局布局发生改变或者视图树中的某个视图的可视状态发生改变
16
        rootView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
17
            @Override
18
            public void onGlobalLayout() {
19
                //获取当前根视图在屏幕上显示的大小
20
                Rect r = new Rect();
21
                rootView.getWindowVisibleDisplayFrame(r);
22
                int visibleHeight = r.height();
23
                System.out.println(""+visibleHeight);
24
                if (rootViewVisibleHeight == 0) {
25
                    rootViewVisibleHeight = visibleHeight;
26
                    return;
27
                }
28
                //根视图显示高度没有变化,可以看作软键盘显示/隐藏状态没有改变
29
                if (rootViewVisibleHeight == visibleHeight) {
30
                    return;
31
                }
32
                //根视图显示高度变小超过200,可以看作软键盘显示了
33
                if (rootViewVisibleHeight - visibleHeight > 200) {
34
                    if (onSoftKeyBoardChangeListener != null) {
35
                        onSoftKeyBoardChangeListener.keyBoardShow(rootViewVisibleHeight - visibleHeight);
36
                    }
37
                    rootViewVisibleHeight = visibleHeight;
38
                    return;
39
                }
40
                //根视图显示高度变大超过200,可以看作软键盘隐藏了
41
                if (visibleHeight - rootViewVisibleHeight > 200) {
42
                    if (onSoftKeyBoardChangeListener != null) {
43
                        onSoftKeyBoardChangeListener.keyBoardHide(visibleHeight - rootViewVisibleHeight);
44
                    }
45
                    rootViewVisibleHeight = visibleHeight;
46
                    return;
47
                }
48
            }
49
        });
50
    }
51
    private void setOnSoftKeyBoardChangeListener(OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener) {
52
        this.onSoftKeyBoardChangeListener = onSoftKeyBoardChangeListener;
53
    }
54
    public interface OnSoftKeyBoardChangeListener {
55
        void keyBoardShow(int height);
56
        void keyBoardHide(int height);
57
    }
58
    public static void setListener(Activity activity, OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener) {
59
        SoftKeyBoardListener softKeyBoardListener = new SoftKeyBoardListener(activity);
60
        softKeyBoardListener.setOnSoftKeyBoardChangeListener(onSoftKeyBoardChangeListener);
61
    }
62
}

+ 7 - 7
app/src/main/res/layout/activity_publish_items.xml

@ -53,10 +53,9 @@
53 53
            android:orientation="horizontal">
54 54

55 55
            <LinearLayout
56
                android:id="@+id/publish_picture"
56
                android:id="@+id/publish_video"
57 57
                android:layout_width="wrap_content"
58 58
                android:layout_height="wrap_content"
59
                android:layout_centerHorizontal="true"
60 59
                android:gravity="center"
61 60
                android:orientation="vertical"
62 61
                android:padding="20dp">
@ -64,21 +63,22 @@
64 63
                <ImageView
65 64
                    android:layout_width="wrap_content"
66 65
                    android:layout_height="wrap_content"
67
                    android:background="@drawable/app_publish_pic_icon" />
66
                    android:background="@drawable/app_publish_video_icon" />
68 67

69 68
                <TextView
70 69
                    android:layout_width="wrap_content"
71 70
                    android:layout_height="wrap_content"
72 71
                    android:layout_marginTop="10dp"
73
                    android:text="图文"
72
                    android:text="视频"
74 73
                    android:textColor="@color/color_222222"
75 74
                    android:textSize="15sp" />
76 75
            </LinearLayout>
77 76

78 77
            <LinearLayout
79
                android:id="@+id/publish_video"
78
                android:id="@+id/publish_picture"
80 79
                android:layout_width="wrap_content"
81 80
                android:layout_height="wrap_content"
81
                android:layout_centerHorizontal="true"
82 82
                android:gravity="center"
83 83
                android:orientation="vertical"
84 84
                android:padding="20dp">
@ -86,13 +86,13 @@
86 86
                <ImageView
87 87
                    android:layout_width="wrap_content"
88 88
                    android:layout_height="wrap_content"
89
                    android:background="@drawable/app_publish_video_icon" />
89
                    android:background="@drawable/app_publish_pic_icon" />
90 90

91 91
                <TextView
92 92
                    android:layout_width="wrap_content"
93 93
                    android:layout_height="wrap_content"
94 94
                    android:layout_marginTop="10dp"
95
                    android:text="视频"
95
                    android:text="图文"
96 96
                    android:textColor="@color/color_222222"
97 97
                    android:textSize="15sp" />
98 98
            </LinearLayout>

+ 1 - 0
app/src/main/res/layout/fragment_chat_content_pictures.xml

@ -111,6 +111,7 @@
111 111
                    android:id="@+id/topicTitle"
112 112
                    android:layout_width="wrap_content"
113 113
                    android:layout_height="wrap_content"
114
                    android:ellipsize="end"
114 115
                    android:maxLines="1"
115 116
                    android:paddingLeft="5dp"
116 117
                    android:textColor="#ffffff"

+ 2 - 1
app/src/main/res/layout/fragment_chat_content_video.xml

@ -127,6 +127,7 @@
127 127
                    android:id="@+id/topicTitle"
128 128
                    android:layout_width="wrap_content"
129 129
                    android:layout_height="wrap_content"
130
                    android:ellipsize="end"
130 131
                    android:maxLines="1"
131 132
                    android:paddingLeft="5dp"
132 133
                    android:textColor="#ffffff"
@ -134,7 +135,7 @@
134 135
                    app:layout_constraintBottom_toBottomOf="parent"
135 136
                    app:layout_constraintLeft_toRightOf="@+id/topicIcon"
136 137
                    app:layout_constraintTop_toTopOf="parent"
137
                    tools:text="#新能源#" />
138
                    tools:text="#新能源#是的咖啡机圣诞快乐附件可是大家反馈律师费了十多斤风口浪尖水电费会计师了多费劲考虑送到" />
138 139
            </android.support.constraint.ConstraintLayout>
139 140
140 141

+ 73 - 0
app/src/main/res/layout/fragment_common_dialog.xml

@ -0,0 +1,73 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:background="#00f00f"
7
    android:layout_height="match_parent">
8
9
    <!-- 底部评论输入及发布 -->
10
    <android.support.constraint.ConstraintLayout
11
        android:layout_width="match_parent"
12
        android:layout_height="wrap_content"
13
        android:background="#535353"
14
        android:minHeight="54dp"
15
        app:layout_constraintBottom_toBottomOf="parent"
16
        app:layout_constraintEnd_toEndOf="parent"
17
        app:layout_constraintStart_toStartOf="parent">
18
19
        <android.support.constraint.ConstraintLayout
20
            android:id="@+id/bWriteComment"
21
            android:layout_width="0dp"
22
            android:layout_height="30dp"
23
            android:layout_marginLeft="15dp"
24
            android:background="@drawable/bg_comment_shape"
25
            app:layout_constraintBottom_toBottomOf="parent"
26
            app:layout_constraintLeft_toLeftOf="parent"
27
            app:layout_constraintRight_toLeftOf="@+id/dialogPublish"
28
            app:layout_constraintTop_toTopOf="parent">
29
30
            <ImageView
31
                android:id="@+id/dialogIcon"
32
                android:layout_width="wrap_content"
33
                android:layout_height="wrap_content"
34
                android:layout_marginStart="15dp"
35
                android:paddingRight="5dp"
36
                app:layout_constraintBottom_toBottomOf="parent"
37
                app:layout_constraintStart_toStartOf="parent"
38
                app:layout_constraintTop_toTopOf="parent"
39
                app:srcCompat="@drawable/write_comment_icon" />
40
41
            <EditText
42
                android:id="@+id/dialogEdit"
43
                android:background="@null"
44
                android:layout_width="0dp"
45
                android:layout_height="wrap_content"
46
                android:hint="优质评论会被优先展示"
47
                android:textColor="#ffffff"
48
                android:textColorHint="#7e7e7e"
49
                android:textSize="14sp"
50
                app:layout_constraintBottom_toBottomOf="parent"
51
                app:layout_constraintRight_toRightOf="parent"
52
                app:layout_constraintLeft_toRightOf="@+id/dialogIcon"
53
                app:layout_constraintTop_toTopOf="parent" />
54
        </android.support.constraint.ConstraintLayout>
55
56
        <TextView
57
            android:id="@+id/dialogPublish"
58
            android:layout_width="wrap_content"
59
            android:layout_height="0dp"
60
            android:gravity="center_vertical"
61
            android:paddingLeft="13dp"
62
            android:paddingRight="15dp"
63
            android:text="发布"
64
            android:textColor="#7e7e7e"
65
            android:textSize="14sp"
66
            app:layout_constraintBottom_toBottomOf="parent"
67
            app:layout_constraintRight_toRightOf="parent"
68
            app:layout_constraintTop_toTopOf="parent"
69
            tools:layout_editor_absoluteX="348dp"
70
            tools:layout_editor_absoluteY="19dp" />
71
    </android.support.constraint.ConstraintLayout>
72
73
</android.support.constraint.ConstraintLayout>

+ 6 - 0
app/src/main/res/values/styles.xml

@ -6,6 +6,12 @@
6 6
        <item name="colorAccent">@color/colorAccent</item>
7 7

8 8
    </style>
9
    <style name="BottomDialog" parent="@style/AppTheme">
10
        <item name="android:layout_width">match_parent</item>
11
        <item name="android:layout_height">wrap_content</item>
12
        <item name="android:windowIsFloating">true</item>
13
        <item name="android:windowSoftInputMode">stateAlwaysVisible</item><!--显示软件盘-->
14
    </style>
9 15

10 16
    <style name="actionBarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
11 17
        <item name="android:textColorPrimary">@android:color/primary_text_light</item>