新增h5功能全服喇叭修改
This commit is contained in:
parent
83aed0bedb
commit
a5826b2dc3
@ -908,5 +908,6 @@
|
||||
<string name="emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 灼灼風華一瞥驚鴻!</string>
|
||||
<string name="try_again_later">數據加載失敗,請稍後再試</string>
|
||||
<string name="open_noble2">開通了</string>
|
||||
<string name="enough_speakers">喇叭數量不足</string>
|
||||
|
||||
</resources>
|
||||
|
@ -188,6 +188,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
}
|
||||
switch (messageType) {
|
||||
case WORLDHORN:
|
||||
if (trumpetNum > 0) {
|
||||
trumpetMsg = content;
|
||||
LiveNetManager.get(getContext())
|
||||
.nobleUseTrumpet(trumpetMsg, mLiveUid, new HttpCallback<List<BaseModel>>() {
|
||||
@ -203,6 +204,11 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(R.string.enough_speakers);
|
||||
dismiss();
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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">
|
||||
|
||||
<include layout="@layout/view_title" />
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user