删除不必要文件,修改设置页面
@ -64,31 +64,31 @@ public class Recognizer extends RelativeLayout {
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
setClickable(true);
|
||||
setBackgroundColor(getResources().getColor(R.color.white));
|
||||
RelativeLayout recognizerContainer =
|
||||
(RelativeLayout)
|
||||
LayoutInflater.from(getContext())
|
||||
.inflate(R.layout.rc_view_recognizer, null);
|
||||
View rlMic = recognizerContainer.findViewById(R.id.rl_mic);
|
||||
rlMic.setOnClickListener(
|
||||
new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (mIat == null || !mIat.isListening()) {
|
||||
startRecognize();
|
||||
} else {
|
||||
reset();
|
||||
}
|
||||
}
|
||||
});
|
||||
imgMic = (ImageView) recognizerContainer.findViewById(R.id.img_mic);
|
||||
|
||||
|
||||
addView(recognizerContainer);
|
||||
random = new Random();
|
||||
String params = SpeechConstant.APPID + "=" + mAppId;
|
||||
SpeechUtility.createUtility(getContext().getApplicationContext(), params);
|
||||
// setClickable(true);
|
||||
// setBackgroundColor(getResources().getColor(R.color.white));
|
||||
// RelativeLayout recognizerContainer =
|
||||
// (RelativeLayout)
|
||||
// LayoutInflater.from(getContext())
|
||||
// .inflate(R.layout.rc_view_recognizer, null);
|
||||
// View rlMic = recognizerContainer.findViewById(R.id.rl_mic);
|
||||
// rlMic.setOnClickListener(
|
||||
// new OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// if (mIat == null || !mIat.isListening()) {
|
||||
// startRecognize();
|
||||
// } else {
|
||||
// reset();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// imgMic = (ImageView) recognizerContainer.findViewById(R.id.img_mic);
|
||||
//
|
||||
//
|
||||
// addView(recognizerContainer);
|
||||
// random = new Random();
|
||||
// String params = SpeechConstant.APPID + "=" + mAppId;
|
||||
// SpeechUtility.createUtility(getContext().getApplicationContext(), params);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -148,83 +148,83 @@ public class Recognizer extends RelativeLayout {
|
||||
}
|
||||
|
||||
private void setRandomImageResource() {
|
||||
int num = random.nextInt(3) + 1;
|
||||
switch (num) {
|
||||
case 1:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_01);
|
||||
break;
|
||||
case 2:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_02);
|
||||
break;
|
||||
default:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_03);
|
||||
break;
|
||||
}
|
||||
// int num = random.nextInt(3) + 1;
|
||||
// switch (num) {
|
||||
// case 1:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_01);
|
||||
// break;
|
||||
// case 2:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_02);
|
||||
// break;
|
||||
// default:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_03);
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
private void changeVolume(int volume) {
|
||||
if (null != imgMic) {
|
||||
switch (volume / 2) {
|
||||
case 0:
|
||||
setRandomImageResource();
|
||||
break;
|
||||
case 1:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_02);
|
||||
break;
|
||||
case 2:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_03);
|
||||
break;
|
||||
case 3:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_04);
|
||||
break;
|
||||
case 4:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_05);
|
||||
break;
|
||||
case 5:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_06);
|
||||
break;
|
||||
case 6:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_07);
|
||||
break;
|
||||
case 7:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_08);
|
||||
break;
|
||||
case 8:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_09);
|
||||
break;
|
||||
case 9:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_10);
|
||||
break;
|
||||
case 10:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_11);
|
||||
break;
|
||||
case 11:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_12);
|
||||
break;
|
||||
case 12:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_13);
|
||||
break;
|
||||
default:
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_volume_14);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if (null != imgMic) {
|
||||
// switch (volume / 2) {
|
||||
// case 0:
|
||||
// setRandomImageResource();
|
||||
// break;
|
||||
// case 1:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_02);
|
||||
// break;
|
||||
// case 2:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_03);
|
||||
// break;
|
||||
// case 3:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_04);
|
||||
// break;
|
||||
// case 4:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_05);
|
||||
// break;
|
||||
// case 5:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_06);
|
||||
// break;
|
||||
// case 6:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_07);
|
||||
// break;
|
||||
// case 7:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_08);
|
||||
// break;
|
||||
// case 8:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_09);
|
||||
// break;
|
||||
// case 9:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_10);
|
||||
// break;
|
||||
// case 10:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_11);
|
||||
// break;
|
||||
// case 11:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_12);
|
||||
// break;
|
||||
// case 12:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_13);
|
||||
// break;
|
||||
// default:
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_volume_14);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private void endOfSpeech() {
|
||||
if (null == imgMic) return;
|
||||
imgMic.setImageResource(R.drawable.rc_anim_speech_end);
|
||||
animEnd = (AnimationDrawable) imgMic.getDrawable();
|
||||
imgMic.clearAnimation();
|
||||
animEnd.start();
|
||||
// if (null == imgMic) return;
|
||||
// imgMic.setImageResource(R.drawable.rc_anim_speech_end);
|
||||
// animEnd = (AnimationDrawable) imgMic.getDrawable();
|
||||
// imgMic.clearAnimation();
|
||||
// animEnd.start();
|
||||
}
|
||||
|
||||
private void beginOfSpeech() {
|
||||
if (null == imgMic) return;
|
||||
imgMic.setImageResource(R.drawable.rc_anim_speech_start);
|
||||
animStart = (AnimationDrawable) imgMic.getDrawable();
|
||||
imgMic.clearAnimation();
|
||||
animStart.start();
|
||||
// if (null == imgMic) return;
|
||||
// imgMic.setImageResource(R.drawable.rc_anim_speech_start);
|
||||
// animStart = (AnimationDrawable) imgMic.getDrawable();
|
||||
// imgMic.clearAnimation();
|
||||
// animStart.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -331,7 +331,7 @@ public class Recognizer extends RelativeLayout {
|
||||
animStart = null;
|
||||
}
|
||||
if (imgMic != null) {
|
||||
imgMic.setImageResource(R.mipmap.rc_recognize_disable);
|
||||
// imgMic.setImageResource(R.mipmap.rc_recognize_disable);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 5.0 KiB |
@ -944,4 +944,5 @@
|
||||
<string name="studio_gift_effects">屏蔽直播間禮物特效</string>
|
||||
<string name="studio_ride_effects">屏蔽直播間座駕特效</string>
|
||||
<string name="in_batch">換一批</string>
|
||||
<string name="chat_chat">聊聊天</string>
|
||||
</resources>
|
||||
|
@ -10,9 +10,9 @@ ext {
|
||||
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",
|
||||
|
7
live/src/main/res/drawable/bc_sound_recording_left.xml
Normal 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>
|
7
live/src/main/res/drawable/bc_sound_recording_right.xml
Normal 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>
|
@ -37,7 +37,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_onecz_event"
|
||||
android:layout_width="55dp"
|
||||
@ -59,8 +58,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_wishlist"
|
||||
android:layout_width="55dp"
|
||||
@ -243,34 +240,44 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/message_layout"
|
||||
android:layout_width="133dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="84dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/bg_live_chat"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="7"
|
||||
android:alpha="0.5"
|
||||
android:background="@drawable/bc_sound_recording_left"
|
||||
android:gravity="center"
|
||||
android:hint="@string/live_say_something"
|
||||
android:hint="@string/chat_chat"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColor"
|
||||
android:textColor="#D9D9D9"
|
||||
android:textColorHint="@color/gray3"
|
||||
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>
|
||||
|
BIN
live/src/main/res/mipmap-xxxhdpi/icon_voice.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
@ -133,18 +133,18 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
startActivity(new Intent(SettingActivity.this, MsgSettActivity.class));
|
||||
}
|
||||
});
|
||||
//屏蔽坐骑特效
|
||||
//屏蔽礼物特效
|
||||
ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mountEffect = !mountEffect;
|
||||
if (mountEffect) {
|
||||
giftEffect = !giftEffect;
|
||||
if (giftEffect) {
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioGiftEffects);
|
||||
} else {
|
||||
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() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
giftEffect = !giftEffect;
|
||||
if (giftEffect) {
|
||||
mountEffect = !mountEffect;
|
||||
if (mountEffect) {
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioRideEffects);
|
||||
} else {
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
|
||||
}
|
||||
//更新特效开关
|
||||
IMLoginManager.get(mContext).setGiftEffect(mountEffect);
|
||||
IMLoginManager.get(mContext).setMountEffect(mountEffect);
|
||||
}
|
||||
});
|
||||
//直播间滚动
|
||||
|