diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 1da6cbd77..bcf6d2cb7 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -908,5 +908,6 @@
昭告天下! %s 向所有人推薦了主播 %s , 灼灼風華一瞥驚鴻!
數據加載失敗,請稍後再試
開通了
+ 喇叭數量不足
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java
index 7b8b20b47..94d43c393 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java
@@ -188,21 +188,27 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
}
switch (messageType) {
case WORLDHORN:
- trumpetMsg = content;
- LiveNetManager.get(getContext())
- .nobleUseTrumpet(trumpetMsg, mLiveUid, new HttpCallback>() {
- @Override
- public void onSuccess(List data) {
- dismiss();
- ToastUtil.show(getResources().getString(R.string.use_successfully));
- }
+ if (trumpetNum > 0) {
+ trumpetMsg = content;
+ LiveNetManager.get(getContext())
+ .nobleUseTrumpet(trumpetMsg, mLiveUid, new HttpCallback>() {
+ @Override
+ public void onSuccess(List data) {
+ dismiss();
+ ToastUtil.show(getResources().getString(R.string.use_successfully));
+ }
+
+ @Override
+ public void onError(String error) {
+ dismiss();
+ ToastUtil.show(error);
+ }
+ });
+ } else {
+ ToastUtil.show(R.string.enough_speakers);
+ dismiss();
+ }
- @Override
- public void onError(String error) {
- dismiss();
- ToastUtil.show(error);
- }
- });
break;
case POPUPSCREEN:
((LiveActivity) mContext).sendDanmuMessage(content);
@@ -235,11 +241,14 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
public void onCheckedChanged(RadioGroup group, int checkedId) {
changeCheckState(checkedId);
if (checkedId == R.id.btn_2) {
- if (nobleId < 5 || trumpetNum < 1) {
+ if (nobleId < 5) {
+
imm.hideSoftInputFromWindow(mInput.getWindowToken(), 0);
HighNobilityDialog fragment = new HighNobilityDialog();
fragment.show(((FragmentActivity) mContext).getSupportFragmentManager(), "HighNobilityDialog");
dismiss();
+
+
}
diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java
index 1e86a9037..e4dc18a53 100644
--- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java
@@ -68,11 +68,17 @@ public class ZhuangBanActivity extends AbsActivity {
@Override
protected void main() {
String url = getIntent().getStringExtra(Constants.URL);
+ String titleString = getIntent().getStringExtra("title");
if (!"".equals(Constants.myPackageUrl)) {
url = Constants.myPackageUrl;
}
v_spacing = (View) findViewById(R.id.v_spacing);
lt_title = (LinearLayout) findViewById(R.id.lt_title);
+ if (getIntent().hasExtra("title") && TextUtils.isEmpty(titleString)) {
+ lt_title.setVisibility(View.GONE);
+ } else {
+ lt_title.setVisibility(View.VISIBLE);
+ }
// if (Constants.isTitle) {
// lt_title.setVisibility(View.VISIBLE);
// v_spacing.setVisibility(View.GONE);
@@ -107,7 +113,12 @@ public class ZhuangBanActivity extends AbsActivity {
@Override
public void onPageFinished(WebView view, String url) {
- setTitle(view.getTitle());
+ if (TextUtils.isEmpty(titleString)){
+ setTitle(view.getTitle());
+ }else {
+ setTitle(titleString);
+ }
+
}
});
mWebView.setWebChromeClient(new WebChromeClient() {
@@ -377,6 +388,9 @@ public class ZhuangBanActivity extends AbsActivity {
Intent intent = new Intent(context, ZhuangBanActivity.class);
Log.i("tag1212", url);
intent.putExtra(Constants.URL, url);
+ if (url.contains("Noble/index.html")){
+ intent.putExtra("title", "");
+ }
context.startActivity(intent);
}
diff --git a/main/src/main/res/layout/activity_zhuang_ban.xml b/main/src/main/res/layout/activity_zhuang_ban.xml
index 7f94bbe3e..e9e2cdbbb 100644
--- a/main/src/main/res/layout/activity_zhuang_ban.xml
+++ b/main/src/main/res/layout/activity_zhuang_ban.xml
@@ -14,7 +14,7 @@
android:id="@+id/lt_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:visibility="gone">
+ android:visibility="visible">