jixionghui 4 vuotta sitten
vanhempi
commit
a177fef63b

+ 2 - 0
skWeiChatBaidu/src/main/java/com/liaobo/im/ui/message/multi/RoomInfoActivity.java

@@ -777,6 +777,8 @@ public class RoomInfoActivity extends BaseActivity {
         } else {
             FriendDao.getInstance().resetTopFriend(mRoom.getUserId());
         }
+        mSbAllowSendCard.setChecked(mucRoom.getAllowSendCard()==1);
+
 
         // 更新消息管理状态
         updateMessageStatus();

+ 2 - 1
skWeiChatBaidu/src/main/java/com/liaobo/im/xmpp/XChatMessageListener.java

@@ -502,8 +502,9 @@ public class XChatMessageListener implements IncomingChatMessageListener {
                         Log.e("msg", "铃声通知");
                         if (!MessageFragment.foreground) {
                             // 消息页面不响铃,
-                            NoticeVoicePlayer.getInstance().start();
+
                         }
+                        NoticeVoicePlayer.getInstance().start();
                     }
                 } else {
                     Log.e("msg", "已针对该好友开启了消息免打扰,不通知");

+ 2 - 1
skWeiChatBaidu/src/main/java/com/liaobo/im/xmpp/XMuChatMessageListener.java

@@ -286,8 +286,9 @@ public class XMuChatMessageListener implements MessageListener {
                         Log.e("msg", "群组铃声通知");
                         if (!MessageFragment.foreground) {
                             // 消息页面不响铃,
-                            NoticeVoicePlayer.getInstance().start();
+
                         }
+                        NoticeVoicePlayer.getInstance().start();
                     }
                 } else {
                     Log.e("msg", "已针对该群组开启了消息免打扰,不通知");

BIN
skWeiChatBaidu/src/main/res/drawable-xhdpi/im_notice.png


+ 43 - 39
skWeiChatBaidu/src/main/res/layout/activity_accessibility.xml

@@ -17,19 +17,17 @@
         android:padding="5dp"
         android:text="@string/automatic_function"
         android:textColor="@color/black"
-        android:textSize="16sp" />
+        android:textSize="14sp" />
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="130dp"
-        android:layout_marginStart="10dp"
-        android:layout_marginTop="10dp"
-        android:layout_marginEnd="10dp"
+        android:layout_height="wrap_content"
+        android:layout_margin="10dp"
+
         android:background="@drawable/shape_bg_gray_eeeeee_radius_24"
         android:gravity="center_vertical"
         android:orientation="vertical"
-        android:paddingStart="10dp"
-        android:paddingEnd="16dp">
+        android:padding="15dp">
 
         <RelativeLayout
             android:layout_width="match_parent"
@@ -55,7 +53,7 @@
                 android:singleLine="true"
                 android:text="@string/auto_get_assign_red_packet"
                 android:textColor="@color/black"
-                android:textSize="22sp" />
+                android:textSize="15sp" />
         </RelativeLayout>
 
 
@@ -67,25 +65,53 @@
             android:gravity="center_vertical"
             android:text="@string/auto_get_assign_red_packet_explain"
             android:textColor="@color/black"
-            android:textSize="14sp" />
+            android:textSize="12sp" />
 
     </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="130dp"
-        android:layout_marginStart="10dp"
-        android:layout_marginTop="10dp"
+        android:layout_height="wrap_content"
+        android:layout_margin="10dp"
         android:gravity="center_vertical"
-        android:layout_marginEnd="10dp"
+
         android:background="@drawable/shape_bg_gray_eeeeee_radius_24"
         android:orientation="vertical"
-        android:paddingStart="10dp"
-        android:paddingEnd="16dp">
+        android:padding="15dp">
+
 
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:orientation="vertical"
+                android:layout_height="wrap_content">
+                <TextView
+                    android:id="@+id/tv_record"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_centerVertical="true"
+                    android:layout_marginEnd="15dp"
+                    android:layout_toStartOf="@+id/flt_packet_record"
+                    android:gravity="center_vertical"
+                    android:singleLine="true"
+                    android:text="@string/view_record"
+                    android:textColor="@color/black"
+                    android:textSize="15sp" />
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/tv_record"
+                    android:layout_centerVertical="true"
+                    android:layout_marginTop="4dp"
+                    android:layout_marginEnd="15dp"
+                    android:gravity="center_vertical"
+                    android:singleLine="true"
+                    android:text="@string/view_auto_get_red_packet"
+                    android:textColor="@color/black"
+                    android:textSize="12sp" />
+            </LinearLayout>
 
             <FrameLayout
                 android:id="@+id/flt_packet_record"
@@ -109,34 +135,12 @@
 
             </FrameLayout>
 
-            <TextView
-                android:id="@+id/tv_record"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginEnd="15dp"
-                android:layout_toStartOf="@+id/flt_packet_record"
-                android:gravity="center_vertical"
-                android:singleLine="true"
-                android:text="@string/view_record"
-                android:textColor="@color/black"
-                android:textSize="22sp" />
+
 
         </RelativeLayout>
 
 
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/tv_record"
-            android:layout_centerVertical="true"
-            android:layout_marginTop="4dp"
-            android:layout_marginEnd="15dp"
-            android:gravity="center_vertical"
-            android:singleLine="true"
-            android:text="@string/view_auto_get_red_packet"
-            android:textColor="@color/black"
-            android:textSize="14sp" />
+
 
     </LinearLayout>
 

+ 247 - 240
skWeiChatBaidu/src/main/res/layout/activity_my_info.xml

@@ -9,276 +9,283 @@
     android:orientation="vertical">
 
     <include layout="@layout/a_view_actionbar" />
-
-    <FrameLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:overScrollMode="never"
 
-        <View
+        android:layout_height="match_parent">
+        <FrameLayout
             android:layout_width="match_parent"
-            android:layout_height="150dp"
-            android:background="@drawable/shape_main_bg"
-            android:visibility="visible" />
+            android:layout_height="match_parent">
 
-        <LinearLayout
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="150dp"
+                android:background="@drawable/shape_main_bg"
+                android:visibility="visible" />
 
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical">
+            <LinearLayout
 
-            <RelativeLayout
-                android:id="@+id/info_rl"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="15dp"
-                android:layout_marginTop="6dp"
-                android:layout_marginEnd="15dp"
-                android:background="@drawable/gray_bg_shadow"
-                android:paddingStart="25dp"
-                android:paddingBottom="24dp">
+                android:layout_height="match_parent"
+                android:orientation="vertical">
 
-                <com.makeramen.roundedimageview.RoundedImageView
-                    android:id="@+id/avatar_img"
-                    android:layout_width="78dp"
-                    android:layout_height="78dp"
+                <RelativeLayout
+                    android:id="@+id/info_rl"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="15dp"
+                    android:layout_marginTop="6dp"
+                    android:layout_marginEnd="15dp"
+                    android:background="@drawable/gray_bg_shadow"
+                    android:paddingStart="25dp"
+                    android:paddingBottom="24dp">
 
+                    <com.makeramen.roundedimageview.RoundedImageView
+                        android:id="@+id/avatar_img"
+                        android:layout_width="78dp"
+                        android:layout_height="78dp"
 
-                    android:layout_marginTop="28dp"
-                    android:contentDescription="@string/app_name"
-                    android:scaleType="centerCrop"
-                    android:src="@drawable/avatar_normal"
 
+                        android:layout_marginTop="28dp"
+                        android:contentDescription="@string/app_name"
+                        android:scaleType="centerCrop"
+                        android:src="@drawable/avatar_normal"
 
-                    app:riv_corner_radius="8dp" />
 
-                <LinearLayout
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="20dp"
-                    android:layout_marginTop="60dp"
-                    android:layout_toEndOf="@+id/avatar_img"
-                    android:orientation="horizontal">
+                        app:riv_corner_radius="8dp" />
 
-                    <TextView
-                        android:id="@+id/tv_nickname"
+                    <LinearLayout
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginEnd="10dp"
-                        android:singleLine="true" />
-
-                    <ImageView
-                        android:id="@+id/iv_modify_nickname"
-                        android:layout_width="20dp"
-                        android:layout_height="20dp"
-                        android:layout_marginStart="10dp"
-                        android:src="@drawable/icon_modify" />
-                </LinearLayout>
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_alignStart="@+id/avatar_img"
-                    android:layout_alignEnd="@+id/avatar_img"
-                    android:layout_alignBottom="@+id/avatar_img"
-                    android:background="@drawable/shape_modify_avatar"
-                    android:gravity="center"
-                    android:text="@string/modify_avatar"
-                    android:textColor="@color/white" />
-
-                <TextView
-                    android:id="@id/tv_diy_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_below="@+id/avatar_img"
-                    android:layout_marginTop="10dp"
-                    android:text="@string/diy_name"
-                    android:textColor="#333333" />
-
-                <EditText
-                    android:id="@+id/edt_diy_name"
-                    android:layout_width="match_parent"
-                    android:layout_height="28dp"
-                    android:textSize="12sp"
-                    android:gravity="center_vertical"
-                    android:textColor="@color/gray"
-                    android:layout_below="@+id/tv_diy_name"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginEnd="30dp"
-                    android:background="@drawable/shape_bg_d8d8d8_radius_12"
-                    android:paddingStart="4dp"
-                    android:paddingTop="2dp"
-                    android:paddingEnd="4dp"
-                    android:paddingBottom="2dp" />
-            </RelativeLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="15dp"
-                android:layout_marginEnd="15dp"
-                android:background="@drawable/gray_bg_shadow"
-                android:orientation="vertical"
-                android:padding="12dp">
-
-                <RelativeLayout style="@style/IMTbleLine_UP2">
+                        android:layout_marginStart="20dp"
+                        android:layout_marginTop="60dp"
+                        android:layout_toEndOf="@+id/avatar_img"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/tv_nickname"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginEnd="10dp"
+                            android:singleLine="true" />
+
+                        <ImageView
+                            android:id="@+id/iv_modify_nickname"
+                            android:layout_width="20dp"
+                            android:layout_height="20dp"
+                            android:layout_marginStart="10dp"
+                            android:src="@drawable/icon_modify" />
+                    </LinearLayout>
 
                     <TextView
-                        android:id="@+id/tv_sex"
-                        style="@style/IMTbleLine_TextKey"
-                        android:drawableLeft="@drawable/resume_star_icon"
-                        android:drawablePadding="5dp"
-                        android:text="@string/sex" />
-
-                    <android.support.v7.widget.SwitchCompat
-                        android:id="@+id/switch_sex"
-
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_alignParentEnd="true"
-                        android:layout_centerVertical="true"
-                        android:textOff="@string/sex_woman"
-                        android:textOn="@string/sex_man"
-                        app:showText="true" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/rlt_birthday"
-                    style="@style/IMTbleLine_UP2">
-
-                    <TextView
-                        android:id="@+id/tv_birthday_text"
-                        style="@style/IMTbleLine_TextKey"
-                        android:drawableStart="@drawable/resume_star_icon"
-                        android:drawablePadding="5dp"
-                        android:text="@string/birthday" />
-
-                    <TextView
-                        android:id="@+id/tv_birthday"
-                        style="@style/IMTbleLine_TextValue"
-                        android:layout_toStartOf="@+id/birthday_arrow_img"
-                        android:layout_toEndOf="@+id/tv_birthday_text" />
-
-                    <ImageView
-                        android:id="@+id/birthday_arrow_img"
-                        style="@style/IMTbleLine_ArrowImg"
-                        android:contentDescription="@string/app_name" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/rlt_user_location"
-                    style="@style/IMTbleLine_UP2">
-
-                    <TextView
-                        android:id="@+id/location_text"
-                        style="@style/IMTbleLine_TextKey"
-                        android:drawableStart="@drawable/resume_star_icon"
-                        android:drawablePadding="5dp"
-                        android:text="@string/user_location" />
-
-                    <TextView
-                        android:id="@+id/tv_location"
-
-                        style="@style/IMTbleLine_TextValue"
-                        android:layout_toStartOf="@+id/city_arrow_img"
-                        android:layout_toEndOf="@+id/location_text" />
-
-                    <ImageView
-                        android:id="@+id/city_arrow_img"
-                        style="@style/IMTbleLine_ArrowImg"
-                        android:contentDescription="@string/app_name" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/rlt_qr_code"
-                    style="@style/IMTbleLine_UP2">
-
-                    <TextView
-                        android:id="@+id/city_text_02"
-                        style="@style/IMTbleLine_TextKey"
-                        android:drawablePadding="5dp"
-                        android:text="@string/qrcode" />
-
-                    <TextView
-                        style="@style/IMTbleLine_TextValue"
-                        android:layout_toLeftOf="@+id/city_arrow_img_02"
-                        android:layout_toRightOf="@+id/city_text_02" />
-
-                    <ImageView
-                        android:layout_width="20dp"
-                        android:layout_height="20dp"
-                        android:layout_alignParentRight="true"
-                        android:layout_centerVertical="true"
-                        android:layout_marginRight="30dp"
-                        android:src="@drawable/ic_qr_code" />
-
-                    <ImageView
-                        android:id="@+id/city_arrow_img_02"
-                        style="@style/IMTbleLine_ArrowImg"
-                        android:contentDescription="@string/app_name" />
-                </RelativeLayout>
-
-                <RelativeLayout
-
-                    style="@style/IMTbleLine_UP2">
+                        android:layout_alignStart="@+id/avatar_img"
+                        android:layout_alignEnd="@+id/avatar_img"
+                        android:layout_alignBottom="@+id/avatar_img"
+                        android:background="@drawable/shape_modify_avatar"
+                        android:gravity="center"
+                        android:text="@string/modify_avatar"
+                        android:textColor="@color/white" />
 
                     <TextView
-                        android:id="@+id/tvPhoneNumber"
-                        style="@style/IMTbleLine_TextKey"
-                        android:drawablePadding="5dp"
-                        android:text="@string/phone_number" />
-
-                    <TextView
-                        android:id="@+id/tv_phone"
-                        style="@style/IMTbleLine_TextValue"
-                        android:layout_toLeftOf="@+id/city_arrow_img_03"
-                        android:text="" />
-
-                    <ImageView
-                        android:id="@+id/city_arrow_img_03"
-                        style="@style/IMTbleLine_ArrowImg"
-                        android:contentDescription="@string/app_name"
-                        android:visibility="invisible" />
+                        android:id="@id/tv_diy_name"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@+id/avatar_img"
+                        android:layout_marginTop="10dp"
+                        android:text="@string/diy_name"
+                        android:textColor="#333333" />
+
+                    <EditText
+                        android:id="@+id/edt_diy_name"
+                        android:layout_width="match_parent"
+                        android:layout_height="28dp"
+                        android:textSize="12sp"
+                        android:gravity="center_vertical"
+                        android:textColor="@color/gray"
+                        android:layout_below="@+id/tv_diy_name"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginEnd="30dp"
+                        android:background="@drawable/shape_bg_d8d8d8_radius_12"
+                        android:paddingStart="4dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="4dp"
+                        android:paddingBottom="2dp" />
                 </RelativeLayout>
 
-                <RelativeLayout
-                    android:id="@+id/rlt_account"
-                    style="@style/IMTbleLine_UP2">
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="15dp"
+                    android:layout_marginEnd="15dp"
+                    android:background="@drawable/gray_bg_shadow"
+                    android:orientation="vertical"
+                    android:padding="12dp">
+
+                    <RelativeLayout style="@style/IMTbleLine_UP2">
+
+                        <TextView
+                            android:id="@+id/tv_sex"
+                            style="@style/IMTbleLine_TextKey"
+                            android:drawableLeft="@drawable/resume_star_icon"
+                            android:drawablePadding="5dp"
+                            android:text="@string/sex" />
+
+                        <android.support.v7.widget.SwitchCompat
+                            android:id="@+id/switch_sex"
+
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_alignParentEnd="true"
+                            android:layout_centerVertical="true"
+                            android:textOff="@string/sex_woman"
+                            android:textOn="@string/sex_man"
+                            app:showText="true" />
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/rlt_birthday"
+                        style="@style/IMTbleLine_UP2">
+
+                        <TextView
+                            android:id="@+id/tv_birthday_text"
+                            style="@style/IMTbleLine_TextKey"
+                            android:drawableStart="@drawable/resume_star_icon"
+                            android:drawablePadding="5dp"
+                            android:text="@string/birthday" />
+
+                        <TextView
+                            android:id="@+id/tv_birthday"
+                            style="@style/IMTbleLine_TextValue"
+                            android:layout_toStartOf="@+id/birthday_arrow_img"
+                            android:layout_toEndOf="@+id/tv_birthday_text" />
+
+                        <ImageView
+                            android:id="@+id/birthday_arrow_img"
+                            style="@style/IMTbleLine_ArrowImg"
+                            android:contentDescription="@string/app_name" />
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/rlt_user_location"
+                        style="@style/IMTbleLine_UP2">
+
+                        <TextView
+                            android:id="@+id/location_text"
+                            style="@style/IMTbleLine_TextKey"
+                            android:drawableStart="@drawable/resume_star_icon"
+                            android:drawablePadding="5dp"
+                            android:text="@string/user_location" />
+
+                        <TextView
+                            android:id="@+id/tv_location"
+
+                            style="@style/IMTbleLine_TextValue"
+                            android:layout_toStartOf="@+id/city_arrow_img"
+                            android:layout_toEndOf="@+id/location_text" />
+
+                        <ImageView
+                            android:id="@+id/city_arrow_img"
+                            style="@style/IMTbleLine_ArrowImg"
+                            android:contentDescription="@string/app_name" />
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/rlt_qr_code"
+                        style="@style/IMTbleLine_UP2">
+
+                        <TextView
+                            android:id="@+id/city_text_02"
+                            style="@style/IMTbleLine_TextKey"
+                            android:drawablePadding="5dp"
+                            android:text="@string/qrcode" />
+
+                        <TextView
+                            style="@style/IMTbleLine_TextValue"
+                            android:layout_toLeftOf="@+id/city_arrow_img_02"
+                            android:layout_toRightOf="@+id/city_text_02" />
+
+                        <ImageView
+                            android:layout_width="20dp"
+                            android:layout_height="20dp"
+                            android:layout_alignParentRight="true"
+                            android:layout_centerVertical="true"
+                            android:layout_marginRight="30dp"
+                            android:src="@drawable/ic_qr_code" />
+
+                        <ImageView
+                            android:id="@+id/city_arrow_img_02"
+                            style="@style/IMTbleLine_ArrowImg"
+                            android:contentDescription="@string/app_name" />
+                    </RelativeLayout>
+
+                    <RelativeLayout
+
+                        style="@style/IMTbleLine_UP2">
+
+                        <TextView
+                            android:id="@+id/tvPhoneNumber"
+                            style="@style/IMTbleLine_TextKey"
+                            android:drawablePadding="5dp"
+                            android:text="@string/phone_number" />
+
+                        <TextView
+                            android:id="@+id/tv_phone"
+                            style="@style/IMTbleLine_TextValue"
+                            android:layout_toLeftOf="@+id/city_arrow_img_03"
+                            android:text="" />
+
+                        <ImageView
+                            android:id="@+id/city_arrow_img_03"
+                            style="@style/IMTbleLine_ArrowImg"
+                            android:contentDescription="@string/app_name"
+                            android:visibility="invisible" />
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/rlt_account"
+                        style="@style/IMTbleLine_UP2">
+
+                        <TextView
+                            style="@style/IMTbleLine_TextKey"
+                            android:drawablePadding="5dp"
+                            android:text="@string/communication" />
+
+                        <TextView
+                            android:id="@+id/tv_communication"
+                            style="@style/IMTbleLine_TextValue"
+                            android:layout_toLeftOf="@+id/iv_communication"
+                            android:selectAllOnFocus="true"
+                            android:text=""
+                            android:textIsSelectable="true" />
+
+                        <ImageView
+                            android:id="@+id/iv_communication"
+                            style="@style/IMTbleLine_ArrowImg"
+                            android:contentDescription="@string/app_name"
+                            android:visibility="invisible" />
+                    </RelativeLayout>
+                </LinearLayout>
 
-                    <TextView
-                        style="@style/IMTbleLine_TextKey"
-                        android:drawablePadding="5dp"
-                        android:text="@string/communication" />
+                <TextView
+                    android:id="@+id/tv_update"
+                    android:layout_width="match_parent"
+                    android:layout_height="48dp"
+                    android:layout_margin="24dp"
+                    android:background="@drawable/shape_bg_blue_radius_8"
+                    android:gravity="center"
+                    android:text="@string/update"
 
-                    <TextView
-                        android:id="@+id/tv_communication"
-                        style="@style/IMTbleLine_TextValue"
-                        android:layout_toLeftOf="@+id/iv_communication"
-                        android:selectAllOnFocus="true"
-                        android:text=""
-                        android:textIsSelectable="true" />
-
-                    <ImageView
-                        android:id="@+id/iv_communication"
-                        style="@style/IMTbleLine_ArrowImg"
-                        android:contentDescription="@string/app_name"
-                        android:visibility="invisible" />
-                </RelativeLayout>
+                    android:textColor="@color/white"
+                    android:textSize="20sp" />
             </LinearLayout>
 
-            <TextView
-                android:id="@+id/tv_update"
-                android:layout_width="match_parent"
-                android:layout_height="48dp"
-                android:layout_margin="24dp"
-                android:background="@drawable/shape_bg_blue_radius_8"
-                android:gravity="center"
-                android:text="@string/update"
+        </FrameLayout>
 
-                android:textColor="@color/white"
-                android:textSize="20sp" />
-        </LinearLayout>
+    </ScrollView>
 
-    </FrameLayout>
 
 
 </LinearLayout>