删除不必要文件,修改设置页面

This commit is contained in:
18401019693 2022-10-24 10:58:56 +08:00
parent e0861ff7eb
commit ab6e578336
32 changed files with 143 additions and 202 deletions

View File

@ -64,31 +64,31 @@ public class Recognizer extends RelativeLayout {
} }
private void initViews() { private void initViews() {
setClickable(true); // setClickable(true);
setBackgroundColor(getResources().getColor(R.color.white)); // setBackgroundColor(getResources().getColor(R.color.white));
RelativeLayout recognizerContainer = // RelativeLayout recognizerContainer =
(RelativeLayout) // (RelativeLayout)
LayoutInflater.from(getContext()) // LayoutInflater.from(getContext())
.inflate(R.layout.rc_view_recognizer, null); // .inflate(R.layout.rc_view_recognizer, null);
View rlMic = recognizerContainer.findViewById(R.id.rl_mic); // View rlMic = recognizerContainer.findViewById(R.id.rl_mic);
rlMic.setOnClickListener( // rlMic.setOnClickListener(
new OnClickListener() { // new OnClickListener() {
@Override // @Override
public void onClick(View view) { // public void onClick(View view) {
if (mIat == null || !mIat.isListening()) { // if (mIat == null || !mIat.isListening()) {
startRecognize(); // startRecognize();
} else { // } else {
reset(); // reset();
} // }
} // }
}); // });
imgMic = (ImageView) recognizerContainer.findViewById(R.id.img_mic); // imgMic = (ImageView) recognizerContainer.findViewById(R.id.img_mic);
//
//
addView(recognizerContainer); // addView(recognizerContainer);
random = new Random(); // random = new Random();
String params = SpeechConstant.APPID + "=" + mAppId; // String params = SpeechConstant.APPID + "=" + mAppId;
SpeechUtility.createUtility(getContext().getApplicationContext(), params); // SpeechUtility.createUtility(getContext().getApplicationContext(), params);
} }
/** /**
@ -148,83 +148,83 @@ public class Recognizer extends RelativeLayout {
} }
private void setRandomImageResource() { private void setRandomImageResource() {
int num = random.nextInt(3) + 1; // int num = random.nextInt(3) + 1;
switch (num) { // switch (num) {
case 1: // case 1:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_01); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_01);
break; // break;
case 2: // case 2:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_02); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_02);
break; // break;
default: // default:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_03); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_03);
break; // break;
} // }
} }
private void changeVolume(int volume) { private void changeVolume(int volume) {
if (null != imgMic) { // if (null != imgMic) {
switch (volume / 2) { // switch (volume / 2) {
case 0: // case 0:
setRandomImageResource(); // setRandomImageResource();
break; // break;
case 1: // case 1:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_02); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_02);
break; // break;
case 2: // case 2:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_03); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_03);
break; // break;
case 3: // case 3:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_04); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_04);
break; // break;
case 4: // case 4:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_05); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_05);
break; // break;
case 5: // case 5:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_06); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_06);
break; // break;
case 6: // case 6:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_07); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_07);
break; // break;
case 7: // case 7:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_08); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_08);
break; // break;
case 8: // case 8:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_09); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_09);
break; // break;
case 9: // case 9:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_10); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_10);
break; // break;
case 10: // case 10:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_11); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_11);
break; // break;
case 11: // case 11:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_12); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_12);
break; // break;
case 12: // case 12:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_13); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_13);
break; // break;
default: // default:
imgMic.setImageResource(R.mipmap.rc_recognize_volume_14); // imgMic.setImageResource(R.mipmap.rc_recognize_volume_14);
break; // break;
} // }
} // }
} }
private void endOfSpeech() { private void endOfSpeech() {
if (null == imgMic) return; // if (null == imgMic) return;
imgMic.setImageResource(R.drawable.rc_anim_speech_end); // imgMic.setImageResource(R.drawable.rc_anim_speech_end);
animEnd = (AnimationDrawable) imgMic.getDrawable(); // animEnd = (AnimationDrawable) imgMic.getDrawable();
imgMic.clearAnimation(); // imgMic.clearAnimation();
animEnd.start(); // animEnd.start();
} }
private void beginOfSpeech() { private void beginOfSpeech() {
if (null == imgMic) return; // if (null == imgMic) return;
imgMic.setImageResource(R.drawable.rc_anim_speech_start); // imgMic.setImageResource(R.drawable.rc_anim_speech_start);
animStart = (AnimationDrawable) imgMic.getDrawable(); // animStart = (AnimationDrawable) imgMic.getDrawable();
imgMic.clearAnimation(); // imgMic.clearAnimation();
animStart.start(); // animStart.start();
} }
@Override @Override
@ -331,7 +331,7 @@ public class Recognizer extends RelativeLayout {
animStart = null; animStart = null;
} }
if (imgMic != null) { if (imgMic != null) {
imgMic.setImageResource(R.mipmap.rc_recognize_disable); // imgMic.setImageResource(R.mipmap.rc_recognize_disable);
} }
} }

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
<item android:drawable="@mipmap/rc_recognize_volume_01"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_02"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_03"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_04"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_05"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_06"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_07"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_08"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_09"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_10"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_11"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_12"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_13"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_14"
android:duration="50"/>
<item android:drawable="@mipmap/rc_recognize_volume_blue"
android:duration="100"/>
</animation-list>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
<item android:drawable="@mipmap/rc_recognize_volume_10"
android:duration="100"/>
<item android:drawable="@mipmap/rc_recognize_volume_11"
android:duration="100"/>
<item android:drawable="@mipmap/rc_recognize_volume_12"
android:duration="100"/>
<item android:drawable="@mipmap/rc_recognize_volume_13"
android:duration="100"/>
<item android:drawable="@mipmap/rc_recognize_volume_14"
android:duration="100"/>
<item android:drawable="@mipmap/rc_recognize_volume_blue"
android:duration="100"/>
</animation-list>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/rc_recognizer_voice_hover" android:state_pressed="true"/>
<item android:drawable="@mipmap/rc_recognizer_voice"/>
</selector>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/rl_mic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@mipmap/rc_recognize_bg_mic">
<ImageView
android:id="@+id/img_mic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@mipmap/rc_recognize_volume_grey" />
</RelativeLayout>
</RelativeLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -944,4 +944,5 @@
<string name="studio_gift_effects">屏蔽直播間禮物特效</string> <string name="studio_gift_effects">屏蔽直播間禮物特效</string>
<string name="studio_ride_effects">屏蔽直播間座駕特效</string> <string name="studio_ride_effects">屏蔽直播間座駕特效</string>
<string name="in_batch">換一批</string> <string name="in_batch">換一批</string>
<string name="chat_chat">聊聊天</string>
</resources> </resources>

View File

@ -10,9 +10,9 @@ ext {
manifestPlaceholders = [ manifestPlaceholders = [
// //
// serverHost : "https://napi.yaoulive.com", serverHost : "https://napi.yaoulive.com",
// //
serverHost : "https://ceshi.yaoulive.com", // serverHost : "https://ceshi.yaoulive.com",
// //
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="17dp"
android:topLeftRadius="17dp" />
<solid android:color="#98000000" />
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomRightRadius="17dp"
android:topRightRadius="17dp" />
<solid android:color="#20FFFFFF" />
</shape>

View File

@ -37,7 +37,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_onecz_event" android:id="@+id/btn_onecz_event"
android:layout_width="55dp" android:layout_width="55dp"
@ -59,8 +58,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_wishlist" android:id="@+id/btn_wishlist"
android:layout_width="55dp" android:layout_width="55dp"
@ -243,34 +240,44 @@
<LinearLayout <LinearLayout
android:id="@+id/message_layout" android:id="@+id/message_layout"
android:layout_width="133dp" android:layout_width="84dp"
android:layout_height="30dp" android:layout_height="34dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:background="@drawable/bg_live_chat"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/et_input" android:id="@+id/et_input"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_weight="1" android:layout_height="match_parent"
android:layout_height="30dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="7"
android:alpha="0.5" android:alpha="0.5"
android:background="@drawable/bc_sound_recording_left"
android:gravity="center" android:gravity="center"
android:hint="@string/live_say_something" android:hint="@string/chat_chat"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/textColor" android:textColor="#D9D9D9"
android:textColorHint="@color/gray3" android:textColorHint="@color/gray3"
android:textSize="12sp" /> android:textSize="12sp" />
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="center"
android:layout_marginEnd="15dp"
android:visibility="visible"
android:src="@mipmap/icon_live_msg" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:gravity="center"
android:background="@drawable/bc_sound_recording_right">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center"
android:src="@mipmap/icon_voice"
android:visibility="visible" />
</LinearLayout>
</LinearLayout> </LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -133,18 +133,18 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
startActivity(new Intent(SettingActivity.this, MsgSettActivity.class)); startActivity(new Intent(SettingActivity.this, MsgSettActivity.class));
} }
}); });
//屏蔽坐骑特效 //屏蔽礼物特效
ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
mountEffect = !mountEffect; giftEffect = !giftEffect;
if (mountEffect) { if (giftEffect) {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioGiftEffects); ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioGiftEffects);
} else { } else {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects); ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects);
} }
//更新特效开关 //更新特效开关
IMLoginManager.get(mContext).setMountEffect(giftEffect); IMLoginManager.get(mContext).setGiftEffect(giftEffect);
} }
}); });
@ -152,14 +152,14 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
ViewClicksAntiShake.clicksAntiShake(studioRideEffects, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(studioRideEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
giftEffect = !giftEffect; mountEffect = !mountEffect;
if (giftEffect) { if (mountEffect) {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioRideEffects); ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioRideEffects);
} else { } else {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects); ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
} }
//更新特效开关 //更新特效开关
IMLoginManager.get(mContext).setGiftEffect(mountEffect); IMLoginManager.get(mContext).setMountEffect(mountEffect);
} }
}); });
//直播间滚动 //直播间滚动