Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
d3d81fda
Commit
d3d81fda
authored
Sep 07, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加猜歌
parent
a828d202
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
485 additions
and
3 deletions
+485
-3
DPHolder.java
...p/src/main/java/com/mints/helivideo/manager/DPHolder.java
+134
-0
MusicFragment.kt
...ain/java/com/mints/helivideo/ui/fragment/MusicFragment.kt
+293
-0
selector_quzi_button_default.xml
...pp/src/main/res/drawable/selector_quzi_button_default.xml
+7
-0
selector_quzi_button_error.xml
.../app/src/main/res/drawable/selector_quzi_button_error.xml
+7
-0
selector_quzi_button_ok.xml
video/app/src/main/res/drawable/selector_quzi_button_ok.xml
+7
-0
fragment_music.xml
video/app/src/main/res/layout/fragment_music.xml
+7
-3
media_layout_quiz.xml
video/app/src/main/res/layout/media_layout_quiz.xml
+30
-0
No files found.
video/app/src/main/java/com/mints/helivideo/manager/DPHolder.java
0 → 100644
View file @
d3d81fda
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
();
}
}
video/app/src/main/java/com/mints/helivideo/ui/fragment/MusicFragment.kt
View file @
d3d81fda
This diff is collapsed.
Click to expand it.
video/app/src/main/res/drawable/selector_quzi_button_default.xml
0 → 100644
View file @
d3d81fda
<?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
video/app/src/main/res/drawable/selector_quzi_button_error.xml
0 → 100644
View file @
d3d81fda
<?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
video/app/src/main/res/drawable/selector_quzi_button_ok.xml
0 → 100644
View file @
d3d81fda
<?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
video/app/src/main/res/layout/fragment_music.xml
View file @
d3d81fda
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</FrameLayout>
\ No newline at end of file
<FrameLayout
android:id=
"@+id/draw_style1_frame"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</RelativeLayout>
\ No newline at end of file
video/app/src/main/res/layout/media_layout_quiz.xml
0 → 100644
View file @
d3d81fda
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment