Commit d3d81fda authored by mengcuiguang's avatar mengcuiguang

添加猜歌

parent a828d202
package com.mints.helivideo.manager;
import com.bytedance.sdk.dp.DPSdk;
import com.bytedance.sdk.dp.DPWidgetBannerParams;
import com.bytedance.sdk.dp.DPWidgetBubbleParams;
import com.bytedance.sdk.dp.DPWidgetDrawParams;
import com.bytedance.sdk.dp.DPWidgetGridParams;
import com.bytedance.sdk.dp.DPWidgetInnerPushParams;
import com.bytedance.sdk.dp.DPWidgetNewsParams;
import com.bytedance.sdk.dp.DPWidgetTextChainParams;
import com.bytedance.sdk.dp.DPWidgetVideoCardParams;
import com.bytedance.sdk.dp.DPWidgetVideoSingleCardParams;
import com.bytedance.sdk.dp.IDPNativeData;
import com.bytedance.sdk.dp.IDPWidget;
import com.bytedance.sdk.dp.IDPWidgetFactory;
import org.json.JSONObject;
/**
* Create by hanweiwei on 2020-03-26.
*/
public final class DPHolder {
private static volatile DPHolder sInstance;
public static DPHolder getInstance() {
if (sInstance == null) {
synchronized (DPHolder.class) {
if (sInstance == null) {
sInstance = new DPHolder();
}
}
}
return sInstance;
}
private DPHolder() {
}
public IDPWidget buildDrawWidget(DPWidgetDrawParams params) {
//创建draw视频流组件
return getFactory().createDraw(params);
}
public IDPWidget buildGridWidget(DPWidgetGridParams params) {
//创建宫格组件
return getFactory().createGrid(params);
}
public IDPWidget buildDoubleFeedWidget(DPWidgetGridParams params) {
//创建双Feed组件
return getFactory().createDoubleFeed(params);
}
public IDPWidget buildNewsTabsWidget(DPWidgetNewsParams params) {
//创建多频道新闻组件
return getFactory().createNewsTabs(params);
}
public IDPWidget buildNewsOneTabWidget(DPWidgetNewsParams params) {
//创建单列表新闻组件
return getFactory().createNewsOneTab(params);
}
public void loadVideoCard(DPWidgetVideoCardParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadVideoCard(params, callback);
}
public void loadSmallVideoCard(DPWidgetVideoCardParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadSmallVideoCard(params, callback);
}
public void loadVideoSingleCard(DPWidgetVideoSingleCardParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadVideoSingleCard(params, callback);
}
public void loadTextChain(DPWidgetTextChainParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadTextChain(params, callback);
}
public void loadCustomVideoCard(DPWidgetVideoCardParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadCustomVideoCard(params, callback);
}
public void loadBubble(DPWidgetBubbleParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadBubble(params, callback);
}
public void loadBanner(DPWidgetBannerParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadBanner(params, callback);
}
public void loadInnerPush(DPWidgetInnerPushParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadInnerPush(params, callback);
}
public void loadVideoSingleCard4News(DPWidgetVideoSingleCardParams params, IDPWidgetFactory.Callback callback) {
getFactory().loadVideoSingleCard4News(params, callback);
}
public void loadNativeNews(DPWidgetNewsParams params, IDPNativeData.DPNativeDataListener listener) {
getFactory().loadNativeNews(params, listener);
}
public void enterNewsDetail(DPWidgetNewsParams params, long groupId, String data) {
getFactory().enterNewsDetail(params, groupId, data);
}
public void loadPush(DPWidgetNewsParams params) {
getFactory().pushNews(params);
}
public void uploadLog(String category, String event, JSONObject json) {
getFactory().uploadLog(category, event, json);
}
public void notifyUserInfo() {
//接入红包功能的开发者,在用户登录成功后需要刷新用户信息
// long uid = LoginActivity.getUserId();
// if (uid == 0) {
// return;
// }
// getFactory().notifyUserInfo(new DPUser()
// .setUserId(uid)//必须透传用户uid
// .setName("test_name")//用户昵称,可选
// .setAvatarUrl("xxx")//用户图像,可选
// );
}
private IDPWidgetFactory getFactory() {
//一定要初始化后才能调用,否则会发生异常问题
return DPSdk.factory();
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="8dp" />
<solid android:color="#55F5F5F5" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="8dp" />
<solid android:color="#BBFF0000" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="8dp" />
<solid android:color="#BB00FF00" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
</FrameLayout> <FrameLayout
\ No newline at end of file android:id="@+id/draw_style1_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="48dp"
android:paddingRight="48dp"
tools:background="@color/black">
<Button
android:id="@+id/quiz_option0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/quiz_option1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:background="@drawable/selector_quzi_button_default"
tools:text="A.心太软" />
<Button
android:id="@+id/quiz_option1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:background="@drawable/selector_quzi_button_default"
tools:text="B.伤心太平洋" />
</RelativeLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment