Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
This commit is contained in:
@ -255,9 +255,14 @@ dependencies {
|
||||
|
||||
implementation "top.zibin:Luban:${luban}"
|
||||
|
||||
// for video streaming
|
||||
implementation "com.squareup.picasso:picasso:${picasso}"
|
||||
|
||||
// for video streaming TODO 用 GSY 替换掉上面的这个 jiaozi
|
||||
implementation "cn.jzvd:jiaozivideoplayer:${jiaoziVideoView}"
|
||||
implementation "com.danikula:videocache:${videoCache}"
|
||||
implementation 'com.shuyu:gsyVideoPlayer-java:7.1.0'
|
||||
implementation 'com.shuyu:gsyVideoPlayer-armv7a:7.1.0'
|
||||
implementation 'com.shuyu:gsyVideoPlayer-x86:7.1.0'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta03'
|
||||
|
||||
implementation "android.arch.work:work-runtime:${workManager}"
|
||||
|
||||
|
||||
@ -230,4 +230,14 @@
|
||||
#阿里云上传
|
||||
-keep class com.alibaba.sdk.android.oss.** { *; }
|
||||
-dontwarn okio.**
|
||||
-dontwarn org.apache.commons.codec.binary.**
|
||||
-dontwarn org.apache.commons.codec.binary.**
|
||||
|
||||
#视频相关
|
||||
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.video.**
|
||||
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
|
||||
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.utils.**
|
||||
-keep class tv.danmaku.ijk.** { *; }
|
||||
-dontwarn tv.danmaku.ijk.**
|
||||
@ -32,6 +32,14 @@
|
||||
<uses-permission android:name = "android.permission.READ_LOGS" />
|
||||
<uses-permission android:name = "android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
|
||||
<uses-sdk
|
||||
tools:overrideLibrary="com.shuyu.gsyvideoplayer,
|
||||
com.shuyu.gsyvideoplayer.lib,
|
||||
com.shuyu.gsyvideoplayer.armv7a,
|
||||
com.shuyu.gsyvideoplayer.x86,
|
||||
com.shuyu.gsy.base,
|
||||
shuyu.com.androidvideocache"/>
|
||||
|
||||
<!-- 去掉 SDK 一些流氓权限 -->
|
||||
<uses-permission android:name = "android.permission.READ_CONTACTS" tools:node = "remove"/>
|
||||
|
||||
@ -391,6 +399,10 @@
|
||||
android:theme = "@style/Theme.Transparent"
|
||||
android:windowSoftInputMode = "adjustNothing" />
|
||||
|
||||
<activity android:name="com.gh.gamecenter.video.detail.VideoDetailActivity"
|
||||
android:screenOrientation = "portrait"
|
||||
android:theme="@style/TransparentStatusBarAndNavigationBar"/>
|
||||
|
||||
<!-- 使用小米/华为推送弹窗功能提高推送成功率-->
|
||||
<activity
|
||||
android:name = "com.gh.gamecenter.PushProxyActivity"
|
||||
|
||||
@ -79,7 +79,7 @@ class ReserveDialogFragment : BaseDialogFragment() {
|
||||
mSuccessCallback?.onSuccess()
|
||||
}
|
||||
}
|
||||
dialog.setCanceledOnTouchOutside(true)
|
||||
dialog?.setCanceledOnTouchOutside(true)
|
||||
}
|
||||
|
||||
private fun showSuccessDialog(withMobile: Boolean) {
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
package com.gh.common.util;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.halo.assistant.HaloApp;
|
||||
|
||||
@ -75,4 +81,36 @@ public class DisplayUtils {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void transparentStatusAndNavigation(Activity activity) {
|
||||
//make full transparent statusBar
|
||||
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
|
||||
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
|
||||
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, true);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
|
||||
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, false);
|
||||
activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
activity.getWindow().setNavigationBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
|
||||
private static void setWindowFlag(Activity activity, final int bits, boolean on) {
|
||||
Window win = activity.getWindow();
|
||||
WindowManager.LayoutParams winParams = win.getAttributes();
|
||||
if (on) {
|
||||
winParams.flags |= bits;
|
||||
} else {
|
||||
winParams.flags &= ~bits;
|
||||
}
|
||||
win.setAttributes(winParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,18 +11,18 @@ import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.PopupWindow
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.lifecycle.*
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.gh.common.constant.Config
|
||||
import com.gh.gamecenter.BuildConfig
|
||||
import com.gh.gamecenter.R
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.halo.assistant.HaloApp
|
||||
import com.lightgame.utils.Utils
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.RequestBody
|
||||
import org.json.JSONArray
|
||||
import java.net.URI
|
||||
|
||||
/**
|
||||
@ -302,4 +302,19 @@ fun TextView.setTextChangedListener(action: (s: CharSequence, start: Int, before
|
||||
|
||||
fun Int.toColor() : Int{
|
||||
return HaloApp.getInstance().application.resources.getColor(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试用包裹
|
||||
*/
|
||||
inline fun debugOnly(f: () -> Unit) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
f()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun testChannelOnly(f: () -> Unit) {
|
||||
if (HaloApp.getInstance().channel == Config.DEFAULT_CHANNEL) {
|
||||
f()
|
||||
}
|
||||
}
|
||||
18
app/src/main/java/com/gh/common/view/StatusBarView.kt
Normal file
18
app/src/main/java/com/gh/common/view/StatusBarView.kt
Normal file
@ -0,0 +1,18 @@
|
||||
package com.gh.common.view
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import com.gh.common.util.DisplayUtils
|
||||
|
||||
class StatusBarView @JvmOverloads constructor(context: Context?, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View(context, attrs, defStyleAttr) {
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
val height = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||
0
|
||||
} else {
|
||||
DisplayUtils.getStatusBarHeight(resources)
|
||||
}
|
||||
setMeasuredDimension(View.MeasureSpec.getSize(widthMeasureSpec), height)
|
||||
}
|
||||
}
|
||||
@ -14,12 +14,11 @@ import butterknife.BindView
|
||||
import cn.jzvd.JzvdStd
|
||||
import com.facebook.drawee.view.SimpleDraweeView
|
||||
import com.gh.base.BaseRecyclerViewHolder
|
||||
import com.gh.common.util.DataCollectionUtils
|
||||
import com.gh.common.util.DataUtils
|
||||
import com.gh.common.util.ImageUtils
|
||||
import com.gh.common.util.*
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.ViewImageActivity
|
||||
import com.gh.gamecenter.databinding.GalleryVideoItemBinding
|
||||
import com.gh.gamecenter.video.detail.VideoDetailActivity
|
||||
import com.halo.assistant.HaloApp
|
||||
import kotlinx.android.synthetic.main.player_view.view.*
|
||||
import java.util.*
|
||||
@ -66,6 +65,15 @@ class GameGalleryAdapter(var context: Context,
|
||||
holder.adapterPosition, mEntrance)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
|
||||
testChannelOnly {
|
||||
holder.itemView.setOnLongClickListener {
|
||||
consume {
|
||||
val intent = VideoDetailActivity.getIntent(context)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
is VideoViewHolder -> {
|
||||
ImageUtils.display(holder.binding.playerView.thumb, mGallery[position])
|
||||
|
||||
@ -2,14 +2,14 @@ package com.gh.gamecenter.qa.follow
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import android.graphics.Point
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.base.fragment.BaseDialogFragment
|
||||
import com.gh.gamecenter.PersonalHomeActivity
|
||||
import com.gh.gamecenter.R
|
||||
@ -29,7 +29,7 @@ class AskFollowMoreDialog : BaseDialogFragment() {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
dialog.setCanceledOnTouchOutside(true)
|
||||
dialog?.setCanceledOnTouchOutside(true)
|
||||
|
||||
val lp = container.layoutParams
|
||||
lp.width = ((getScreenWidth(requireActivity())) * 0.8).toInt()
|
||||
|
||||
@ -3,18 +3,17 @@ package com.gh.gamecenter.qa.questions.edit
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.Dialog
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.KeyEvent
|
||||
import android.view.MenuItem
|
||||
import android.widget.EditText
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.gh.base.BaseActivity
|
||||
import com.gh.base.fragment.BaseDialogWrapperFragment
|
||||
import com.gh.base.fragment.WaitingDialogFragment
|
||||
@ -263,11 +262,11 @@ class QuestionEditActivity : BaseActivity() {
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle?) {
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
outState?.putString(mSaveTitleKey, mViewModel.title)
|
||||
outState?.putString(mSaveContentKey, mViewModel.content)
|
||||
outState?.putStringArrayList(mSaveImagesKey, mViewModel.picList.value as java.util.ArrayList<String>?)
|
||||
outState.putString(mSaveTitleKey, mViewModel.title)
|
||||
outState.putString(mSaveContentKey, mViewModel.content)
|
||||
outState.putStringArrayList(mSaveImagesKey, mViewModel.picList.value as java.util.ArrayList<String>?)
|
||||
}
|
||||
|
||||
// Limits of EditText
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
package com.gh.gamecenter.video.detail
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import com.gh.gamecenter.R
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
|
||||
import com.squareup.picasso.Picasso
|
||||
|
||||
class DetailPlayerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null)
|
||||
: StandardGSYVideoPlayer(context, attrs) {
|
||||
|
||||
override fun init(context: Context) {
|
||||
super.init(context)
|
||||
|
||||
if (mThumbImageViewLayout != null && (mCurrentState == -1 || mCurrentState == GSYVideoView.CURRENT_STATE_NORMAL || mCurrentState == GSYVideoView.CURRENT_STATE_ERROR)) {
|
||||
mThumbImageViewLayout.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
fun updateThumb(url: String) {
|
||||
Picasso.with(context).load(url)
|
||||
.into(findViewById<ImageView>(R.id.thumbImage))
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.layout_simple_player
|
||||
}
|
||||
|
||||
/******************* 下方两个重载方法,在播放开始前不屏蔽封面,不需要可屏蔽 ********************/
|
||||
|
||||
override fun onSurfaceUpdated(surface: Surface) {
|
||||
super.onSurfaceUpdated(surface)
|
||||
if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) {
|
||||
mThumbImageViewLayout.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
override fun setViewShowState(view: View?, visibility: Int) {
|
||||
if (view === mThumbImageViewLayout && visibility != View.VISIBLE) {
|
||||
return
|
||||
}
|
||||
super.setViewShowState(view, visibility)
|
||||
}
|
||||
|
||||
/********************************各类UI的状态显示*********************************************/
|
||||
|
||||
override fun hideAllWidget() {
|
||||
super.hideAllWidget()
|
||||
setViewShowState(mBottomProgressBar, View.VISIBLE)
|
||||
}
|
||||
|
||||
override fun changeUiToNormal() {
|
||||
super.changeUiToNormal()
|
||||
setViewShowState(mStartButton, View.INVISIBLE)
|
||||
setViewShowState(mBottomProgressBar, View.VISIBLE)
|
||||
}
|
||||
|
||||
override fun changeUiToPreparingShow() {
|
||||
super.changeUiToPreparingShow()
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingShow() {
|
||||
super.changeUiToPlayingShow()
|
||||
setViewShowState(mStartButton, View.INVISIBLE)
|
||||
setViewShowState(mBottomProgressBar, View.VISIBLE)
|
||||
}
|
||||
|
||||
override fun changeUiToPauseShow() {
|
||||
super.changeUiToPauseShow()
|
||||
setViewShowState(mStartButton, View.VISIBLE)
|
||||
setViewShowState(mBottomProgressBar, View.VISIBLE)
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingBufferingShow() {
|
||||
super.changeUiToPlayingBufferingShow()
|
||||
setViewShowState(mBottomProgressBar, View.VISIBLE)
|
||||
}
|
||||
|
||||
override fun changeUiToCompleteShow() {
|
||||
super.changeUiToCompleteShow()
|
||||
setViewShowState(mBottomProgressBar, View.VISIBLE)
|
||||
}
|
||||
|
||||
override fun updateStartImage() {
|
||||
// no need to change
|
||||
}
|
||||
|
||||
override fun touchDoubleUp() {
|
||||
// we don't need double tap to stop
|
||||
}
|
||||
|
||||
override fun changeUiToPauseClear() {
|
||||
// we don't need to hide play icon
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
val id = v.id
|
||||
if (id == R.id.surface_container) {
|
||||
clickStartIcon()
|
||||
} else {
|
||||
super.onClick(v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.gh.gamecenter.video.detail
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.gh.base.BaseActivity
|
||||
import com.gh.common.util.DisplayUtils
|
||||
import com.gh.gamecenter.R
|
||||
|
||||
class VideoDetailActivity : BaseActivity() {
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.activity_video_detail
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
DisplayUtils.transparentStatusAndNavigation(this)
|
||||
|
||||
val containerFragment = VideoDetailContainerFragment()
|
||||
|
||||
supportFragmentManager.beginTransaction().replace(R.id.placeholder, containerFragment).commitNowAllowingStateLoss()
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun getIntent(context: Context): Intent {
|
||||
val intent = Intent(context, VideoDetailActivity::class.java)
|
||||
return intent
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.gh.gamecenter.video.detail
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.normal.NormalFragment
|
||||
import kotlinx.android.synthetic.main.fragment_video_detail_container.*
|
||||
|
||||
class VideoDetailContainerFragment : NormalFragment() {
|
||||
|
||||
private lateinit var mFragmentAdapter: VideoFragmentPagerAdapter
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_video_detail_container
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material)
|
||||
toolbar.setNavigationOnClickListener {
|
||||
requireActivity().finish()
|
||||
}
|
||||
|
||||
mFragmentAdapter = VideoFragmentPagerAdapter(this)
|
||||
|
||||
mFragmentAdapter.videoList = arrayListOf(
|
||||
"https://resource.ghzs.com/video/game/5cef8c58bb946d11052dfe65.mp4",
|
||||
"https://resource.ghzs.com/video/game/5d26e984c391ca0c9a16121c.mp4",
|
||||
"https://resource.ghzs.com/video/game/5d53bc8e656a5c05bf59d2e7.mp4")
|
||||
|
||||
viewpager.adapter = mFragmentAdapter
|
||||
viewpager.orientation = ViewPager2.ORIENTATION_VERTICAL
|
||||
viewpager.offscreenPageLimit = 1
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.gh.gamecenter.video.detail
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import butterknife.BindView
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.normal.NormalFragment
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
|
||||
class VideoDetailFragment : NormalFragment() {
|
||||
|
||||
private var videoUrl = ""
|
||||
|
||||
@BindView(R.id.video)
|
||||
lateinit var videoView: DetailPlayerView
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_video_detail
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
GSYVideoOptionBuilder()
|
||||
.setIsTouchWiget(false)
|
||||
.setUrl(videoUrl)
|
||||
.setRotateViewAuto(false)
|
||||
.setCacheWithPlay(true)
|
||||
.setRotateViewAuto(false)
|
||||
.setRotateWithSystem(false)
|
||||
.setReleaseWhenLossAudio(true)
|
||||
.setLockLand(true)
|
||||
.setLooping(true)
|
||||
.build(videoView)
|
||||
|
||||
videoView.updateThumb("$videoUrl?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0")
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
videoView.startPlayLogic()
|
||||
Log.d("lifeCycle", "onResume")
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
Log.d("lifeCycle", "onPause")
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(url: String): VideoDetailFragment {
|
||||
return VideoDetailFragment().apply { videoUrl = url }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.gh.gamecenter.video.detail
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
|
||||
class VideoFragmentPagerAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {
|
||||
|
||||
var videoList = arrayListOf<String>()
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return videoList.size
|
||||
}
|
||||
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
return VideoDetailFragment.newInstance(videoList[position])
|
||||
}
|
||||
|
||||
}
|
||||
10
app/src/main/res/layout/activity_video_detail.xml
Normal file
10
app/src/main/res/layout/activity_video_detail.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/placeholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</RelativeLayout>
|
||||
13
app/src/main/res/layout/fragment_video_detail.xml
Normal file
13
app/src/main/res/layout/fragment_video_detail.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.gh.gamecenter.video.detail.DetailPlayerView
|
||||
android:id="@+id/video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
45
app/src/main/res/layout/fragment_video_detail_container.xml
Normal file
45
app/src/main/res/layout/fragment_video_detail_container.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?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:orientation="vertical"
|
||||
tools:background="@color/colorAccent">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.gh.common.view.StatusBarView
|
||||
android:id="@+id/statusbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_below="@id/statusbar"
|
||||
android:background="@android:color/transparent"
|
||||
android:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_below="@id/statusbar"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="Faithless the wonder boy"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
97
app/src/main/res/layout/layout_simple_player.xml
Normal file
97
app/src/main/res/layout/layout_simple_player.xml
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/surface_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#99000000"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="00:00"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1.0"
|
||||
android:background="@null"
|
||||
android:max="100"
|
||||
android:maxHeight="4dp"
|
||||
android:minHeight="4dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:progressDrawable="@drawable/video_seek_progress"
|
||||
android:thumb="@drawable/video_seek_thumb" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:text="00:00"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fullscreen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingRight="16dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/video_enlarge"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/thumb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000000">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/thumbImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/bottom_progressbar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:max="100"
|
||||
android:progressDrawable="@drawable/video_progress" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_play_circle_outline_white_48dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -1,248 +1,253 @@
|
||||
<resources xmlns:android = "http://schemas.android.com/apk/res/android" >
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- extends common style -->
|
||||
<style name = "AppCompatTheme.APP" >
|
||||
<style name="AppCompatTheme.APP">
|
||||
|
||||
<item name = "colorAccent" >@color/theme</item >
|
||||
<item name = "colorPrimary" >@color/theme</item >
|
||||
<item name="colorAccent">@color/theme</item>
|
||||
<item name="colorPrimary">@color/theme</item>
|
||||
<!-- 导航栏颜色(还包括列表下拉沉浸色 等等)-->
|
||||
<item name = "colorPrimaryDark" >@color/system_bar</item >
|
||||
<item name="colorPrimaryDark">@color/system_bar</item>
|
||||
<!-- 设置沉浸栏颜色 5.0以上有效 -->
|
||||
<item name = "android:windowLightStatusBar" >true</item >
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
|
||||
<item name = "android:actionModeBackground" >@color/theme</item >
|
||||
<item name = "actionModeBackground" >@color/theme</item >
|
||||
<item name="android:actionModeBackground">@color/theme</item>
|
||||
<item name="actionModeBackground">@color/theme</item>
|
||||
|
||||
<item name = "android:windowBackground" >@color/background</item >
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
|
||||
<item name = "android:navigationIcon" >@drawable/ic_bar_back</item >
|
||||
<item name = "navigationIcon" >@drawable/ic_bar_back</item >
|
||||
<item name = "android:homeAsUpIndicator" >@drawable/ic_bar_back</item >
|
||||
<item name = "homeAsUpIndicator" >@drawable/ic_bar_back</item >
|
||||
<item name="android:navigationIcon">@drawable/ic_bar_back</item>
|
||||
<item name="navigationIcon">@drawable/ic_bar_back</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_bar_back</item>
|
||||
<item name="homeAsUpIndicator">@drawable/ic_bar_back</item>
|
||||
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "AppGuideTheme" parent = "AppCompatTheme.APP" >
|
||||
<item name = "android:windowBackground" >@android:color/transparent</item >
|
||||
<item name = "android:windowIsTranslucent" >true</item >
|
||||
<item name = "android:windowFullscreen" >true</item >
|
||||
<item name = "android:windowNoTitle" >true</item >
|
||||
</style >
|
||||
<style name="AppGuideTheme" parent="AppCompatTheme.APP">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name = "Theme.Transparent" parent = "AppCompatTheme.APP" >
|
||||
<item name = "android:windowBackground" >@android:color/transparent</item >
|
||||
<item name = "android:windowIsTranslucent" >true</item >
|
||||
<item name = "android:windowActionBarOverlay" >true</item >
|
||||
<item name = "android:colorBackgroundCacheHint" >@null</item >
|
||||
<item name = "android:windowAnimationStyle" >@android:style/Animation</item >
|
||||
<item name = "android:windowContentOverlay" >@null</item >
|
||||
</style >
|
||||
<style name="Theme.Transparent" parent="AppCompatTheme.APP">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
</style>
|
||||
|
||||
<style name = "AppFullScreenTheme" parent = "AppCompatTheme.APP" >
|
||||
<item name = "android:windowBackground" >@android:color/transparent</item >
|
||||
<item name = "android:windowIsTranslucent" >true</item >
|
||||
<item name = "android:windowLightStatusBar" >false</item >
|
||||
<item name = "android:windowActionBarOverlay" >true</item >
|
||||
<item name = "android:colorBackgroundCacheHint" >@null</item >
|
||||
<item name = "android:windowAnimationStyle" >@android:style/Animation</item >
|
||||
<item name = "android:windowContentOverlay" >@null</item >
|
||||
<item name = "android:windowFullscreen" >true</item >
|
||||
</style >
|
||||
<style name="AppFullScreenTheme" parent="AppCompatTheme.APP">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
</style>
|
||||
|
||||
<style name = "AskTabStyle" parent = "Widget.Design.TabLayout" >
|
||||
<style name="TransparentStatusBarAndNavigationBar" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
</style>
|
||||
|
||||
<item name = "tabPaddingStart" >0dp</item >
|
||||
<item name = "tabPaddingEnd" >0dp</item >
|
||||
<item name = "tabIndicatorHeight" >0dp</item >
|
||||
<item name = "tabGravity" >fill</item >
|
||||
<item name = "tabIndicatorColor" >@color/theme</item >
|
||||
<style name="AskTabStyle" parent="Widget.Design.TabLayout">
|
||||
|
||||
<item name = "tabMode" >scrollable</item >
|
||||
<item name="tabPaddingStart">0dp</item>
|
||||
<item name="tabPaddingEnd">0dp</item>
|
||||
<item name="tabIndicatorHeight">0dp</item>
|
||||
<item name="tabGravity">fill</item>
|
||||
<item name="tabIndicatorColor">@color/theme</item>
|
||||
|
||||
</style >
|
||||
<item name="tabMode">scrollable</item>
|
||||
|
||||
<style name = "TabLayoutTextAppearance" parent = "TextAppearance.AppCompat.Widget.ActionBar.Title" >
|
||||
<item name = "android:textSize" >14sp</item >
|
||||
<item name = "android:textColor" >@color/text_tabbar_style</item >
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "BoldTabLayoutTextAppearance" parent = "TabLayoutTextAppearance" >
|
||||
<style name="TabLayoutTextAppearance" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/text_tabbar_style</item>
|
||||
</style>
|
||||
|
||||
<style name="BoldTabLayoutTextAppearance" parent="TabLayoutTextAppearance">
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "Base_ToolbarStyle.Blue" >
|
||||
<item name = "android:background" >@color/bg_scan</item >
|
||||
</style >
|
||||
<style name="Base_ToolbarStyle.Blue">
|
||||
<item name="android:background">@color/bg_scan</item>
|
||||
</style>
|
||||
|
||||
<style name = "Base_ToolbarStyle" >
|
||||
<item name = "android:layout_height" >@dimen/appbar_height</item >
|
||||
<item name = "android:layout_width" >match_parent</item >
|
||||
<item name = "popupTheme" >@style/ThemeOverlay.AppCompat.Light</item >
|
||||
<item name = "android:background" >@android:color/white</item >
|
||||
<item name = "android:theme" >@style/Base_ToolbarTheme</item >
|
||||
<item name = "titleTextAppearance" >@style/CustomTitleTextAppearance</item >
|
||||
<item name = "subtitleTextAppearance" >@style/CustomSubTitleTextAppearance</item >
|
||||
<item name = "android:homeAsUpIndicator" >@drawable/ic_bar_back</item >
|
||||
<style name="Base_ToolbarStyle">
|
||||
<item name="android:layout_height">@dimen/appbar_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="android:background">@android:color/white</item>
|
||||
<item name="android:theme">@style/Base_ToolbarTheme</item>
|
||||
<item name="titleTextAppearance">@style/CustomTitleTextAppearance</item>
|
||||
<item name="subtitleTextAppearance">@style/CustomSubTitleTextAppearance</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_bar_back</item>
|
||||
<!--<item name = "titleMarginStart" >-10dp</item >-->
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "Base_ToolbarTheme" >
|
||||
<style name="Base_ToolbarTheme">
|
||||
<!-- Color used for the title of the Toolbar - as long as not overridden -->
|
||||
<!--<item name="android:textColorPrimary">@color/pink_500_primary</item>-->
|
||||
<!-- Used to color back button and three dots -->
|
||||
<!--<item name="android:textColorSecondary">@color/yellow_500_primary</item>-->
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "CustomTitleTextAppearance" parent = "TextAppearance.Widget.AppCompat.Toolbar.Title" >
|
||||
<style name="CustomTitleTextAppearance" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
|
||||
<!--<item name="android:fontFamily">@string/ff_roboto_condensed</item>-->
|
||||
<item name = "android:textSize" >16sp</item >
|
||||
<item name = "android:textColor" >@android:color/white</item >
|
||||
<item name = "android:textStyle" >bold</item >
|
||||
</style >
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name = "CustomSubTitleTextAppearance" parent = "TextAppearance.Widget.AppCompat.Toolbar.Subtitle" >
|
||||
<style name="CustomSubTitleTextAppearance" parent="TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
|
||||
<!--<item name="android:fontFamily">@string/ff_roboto_condensed</item>-->
|
||||
<item name = "android:textSize" >14sp</item >
|
||||
<item name="android:textSize">14sp</item>
|
||||
<!--<item name="android:textColor">@color/pink_500_primary</item>-->
|
||||
<item name = "android:textStyle" >italic</item >
|
||||
</style >
|
||||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
<!-- 这个是加入的代码 -->
|
||||
<style name = "mypopwindow_anim_style" >
|
||||
<item name = "android:windowEnterAnimation" >@anim/popshow_anim</item >
|
||||
<style name="mypopwindow_anim_style">
|
||||
<item name="android:windowEnterAnimation">@anim/popshow_anim</item>
|
||||
<!-- 指定显示的动画xml -->
|
||||
|
||||
<item name = "android:windowExitAnimation" >@anim/pophidden_anim</item >
|
||||
<item name="android:windowExitAnimation">@anim/pophidden_anim</item>
|
||||
<!-- 指定消失的动画xml -->
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "popwindow_option_anim_style" >
|
||||
<item name = "android:windowEnterAnimation" >@anim/popwindow_option_anim_enter</item >
|
||||
<item name = "android:windowExitAnimation" >@anim/popwindow_option_anim_exit</item >
|
||||
</style >
|
||||
<style name="popwindow_option_anim_style">
|
||||
<item name="android:windowEnterAnimation">@anim/popwindow_option_anim_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/popwindow_option_anim_exit</item>
|
||||
</style>
|
||||
|
||||
<style name = "CheckboxStyle" parent = "@android:style/Widget.CompoundButton.CheckBox" >
|
||||
<item name = "android:button" >@drawable/checkbox_style</item >
|
||||
</style >
|
||||
<style name="CheckboxStyle" parent="@android:style/Widget.CompoundButton.CheckBox">
|
||||
<item name="android:button">@drawable/checkbox_style</item>
|
||||
</style>
|
||||
|
||||
<style name = "KaiFuRadioStyle" parent = "@android:style/Widget.CompoundButton.RadioButton" >
|
||||
<item name = "android:button" >@drawable/checkbox_style</item >
|
||||
</style >
|
||||
<style name="KaiFuRadioStyle" parent="@android:style/Widget.CompoundButton.RadioButton">
|
||||
<item name="android:button">@drawable/checkbox_style</item>
|
||||
</style>
|
||||
|
||||
<style name = "KcCheckboxStyle" parent = "@android:style/Widget.CompoundButton.RadioButton" >
|
||||
<item name = "android:button" >@drawable/kc_checkbox_style</item >
|
||||
</style >
|
||||
<style name="KcCheckboxStyle" parent="@android:style/Widget.CompoundButton.RadioButton">
|
||||
<item name="android:button">@drawable/kc_checkbox_style</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name = "FontSizeRadioStyle" parent = "@android:style/Widget.CompoundButton.RadioButton" >
|
||||
<item name = "android:button" >@drawable/fontsize_radio_style</item >
|
||||
</style >
|
||||
<style name="FontSizeRadioStyle" parent="@android:style/Widget.CompoundButton.RadioButton">
|
||||
<item name="android:button">@drawable/fontsize_radio_style</item>
|
||||
</style>
|
||||
|
||||
<!-- fresco xml配置-->
|
||||
<style name = "frescoStyle" >
|
||||
<item name = "placeholderImage" >@drawable/occupy</item >
|
||||
<item name = "placeholderImageScaleType" >fitXY</item >
|
||||
<item name = "fadeDuration" >500</item >
|
||||
<style name="frescoStyle">
|
||||
<item name="placeholderImage">@drawable/occupy</item>
|
||||
<item name="placeholderImageScaleType">fitXY</item>
|
||||
<item name="fadeDuration">500</item>
|
||||
<!--<item name="backgroundImage">@color/placeholder_bg</item>-->
|
||||
</style >
|
||||
</style>
|
||||
|
||||
<style name = "frescoCircleStyle" >
|
||||
<item name = "placeholderImage" >@drawable/occupy</item >
|
||||
<item name = "placeholderImageScaleType" >fitXY</item >
|
||||
<item name = "fadeDuration" >500</item >
|
||||
<item name = "roundAsCircle" >true</item >
|
||||
</style >
|
||||
<style name="frescoCircleStyle">
|
||||
<item name="placeholderImage">@drawable/occupy</item>
|
||||
<item name="placeholderImageScaleType">fitXY</item>
|
||||
<item name="fadeDuration">500</item>
|
||||
<item name="roundAsCircle">true</item>
|
||||
</style>
|
||||
|
||||
<style name = "MySwitchButtonMD" parent = "SwitchButtonMD" >
|
||||
<item name = "kswThumbDrawable" >@drawable/md_switch_thumb_on_or_off</item >
|
||||
<item name = "kswBackRadius" >0dp</item >
|
||||
<item name = "kswThumbMarginTop" >-16dp</item >
|
||||
<item name = "kswThumbMarginBottom" >-16dp</item >
|
||||
<item name = "kswBackMeasureRatio" >1.60</item >
|
||||
<item name = "kswBackColor" >@drawable/switchbuttom_back_color</item >
|
||||
</style >
|
||||
<style name="MySwitchButtonMD" parent="SwitchButtonMD">
|
||||
<item name="kswThumbDrawable">@drawable/md_switch_thumb_on_or_off</item>
|
||||
<item name="kswBackRadius">0dp</item>
|
||||
<item name="kswThumbMarginTop">-16dp</item>
|
||||
<item name="kswThumbMarginBottom">-16dp</item>
|
||||
<item name="kswBackMeasureRatio">1.60</item>
|
||||
<item name="kswBackColor">@drawable/switchbuttom_back_color</item>
|
||||
</style>
|
||||
|
||||
<style name = "DialogWindowTransparent" parent = "android:style/Theme.Dialog" >
|
||||
<item name = "android:background" >@android:color/transparent</item >
|
||||
<item name = "android:windowBackground" >@android:color/transparent</item >
|
||||
<item name = "android:windowNoTitle" >true</item >
|
||||
<item name = "android:windowFrame" >@null</item >
|
||||
</style >
|
||||
<style name="DialogWindowTransparent" parent="android:style/Theme.Dialog">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
</style>
|
||||
|
||||
<style name = "MyEditText" parent = "Theme.AppCompat.Light" >
|
||||
<item name = "colorControlNormal" >@color/hint</item >
|
||||
<item name = "colorControlActivated" >@color/hint</item >
|
||||
</style >
|
||||
<style name="MyEditText" parent="Theme.AppCompat.Light">
|
||||
<item name="colorControlNormal">@color/hint</item>
|
||||
<item name="colorControlActivated">@color/hint</item>
|
||||
</style>
|
||||
|
||||
<style name = "GhAlertDialog" parent = "Theme.AppCompat.Light.Dialog.Alert" >
|
||||
<item name = "android:textSize" >17sp</item >
|
||||
<style name="GhAlertDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<!--<item name = "android:textStyle">bold</item>-->
|
||||
<item name = "android:textColor" >@color/black</item >
|
||||
</style >
|
||||
<item name="android:textColor">@color/black</item>
|
||||
</style>
|
||||
|
||||
<style name = "Widget.MaterialRatingBar.RatingBar" parent = "android:Widget.RatingBar" >
|
||||
<style name="Widget.MaterialRatingBar.RatingBar" parent="android:Widget.RatingBar">
|
||||
<!--
|
||||
Disabled for correct behavior on Android 4.x, see
|
||||
https://github.com/android/platform_frameworks_base/commit/911743652b597057a1bd7ef8a921e9ff8dce0f4a#diff-149f45c5ff2d3185bb79688ba17bc432L536
|
||||
<item name="android:progressDrawable">@null</item>
|
||||
-->
|
||||
<item name = "android:indeterminateDrawable" >@null</item >
|
||||
<item name = "android:minHeight" >36dp</item >
|
||||
<item name = "android:maxHeight" >36dp</item >
|
||||
</style >
|
||||
<item name="android:indeterminateDrawable">@null</item>
|
||||
<item name="android:minHeight">36dp</item>
|
||||
<item name="android:maxHeight">36dp</item>
|
||||
</style>
|
||||
|
||||
<style name = "discoverItem" >
|
||||
<item name = "android:layout_width" >match_parent</item >
|
||||
<item name = "android:layout_height" >48dp</item >
|
||||
<item name = "android:background" >@drawable/reuse_listview_item_style</item >
|
||||
<item name = "android:paddingLeft" >18dp</item >
|
||||
<item name = "android:paddingRight" >18dp</item >
|
||||
</style >
|
||||
<style name="discoverItem">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:background">@drawable/reuse_listview_item_style</item>
|
||||
<item name="android:paddingLeft">18dp</item>
|
||||
<item name="android:paddingRight">18dp</item>
|
||||
</style>
|
||||
|
||||
<style name = "discoverIcon" >
|
||||
<item name = "android:layout_width" >18dp</item >
|
||||
<item name = "android:layout_height" >18dp</item >
|
||||
<item name = "android:layout_centerVertical" >true</item >
|
||||
<item name = "android:layout_marginRight" >18dp</item >
|
||||
</style >
|
||||
<style name="discoverIcon">
|
||||
<item name="android:layout_width">18dp</item>
|
||||
<item name="android:layout_height">18dp</item>
|
||||
<item name="android:layout_centerVertical">true</item>
|
||||
<item name="android:layout_marginRight">18dp</item>
|
||||
</style>
|
||||
|
||||
<style name = "discoverTitle" >
|
||||
<item name = "android:layout_width" >wrap_content</item >
|
||||
<item name = "android:layout_height" >wrap_content</item >
|
||||
<item name = "android:layout_centerVertical" >true</item >
|
||||
<item name = "android:textColor" >@color/title</item >
|
||||
<item name = "android:textSize" >15sp</item >
|
||||
</style >
|
||||
<style name="discoverTitle">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_centerVertical">true</item>
|
||||
<item name="android:textColor">@color/title</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name = "full_dialog" >
|
||||
<item name = "android:windowFrame" >@null</item >
|
||||
<item name = "android:windowNoTitle" >true</item >
|
||||
<item name = "android:windowIsFloating" >true</item >
|
||||
<item name = "android:windowAnimationStyle" >@android:style/Animation.Dialog</item >
|
||||
</style >
|
||||
<style name="full_dialog">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
|
||||
</style>
|
||||
|
||||
<style name = "Matisse.Custom" parent = "AppCompatTheme.APP" >
|
||||
<item name = "colorPrimary" >@android:color/white</item >
|
||||
<item name = "colorPrimaryDark" >@color/system_bar</item >
|
||||
<item name = "toolbar" >@style/Base_ToolbarStyle</item >
|
||||
<item name = "album.dropdown.title.color" >@color/black</item >
|
||||
<item name = "album.dropdown.count.color" >@color/zhihu_album_dropdown_count_text</item >
|
||||
<item name = "album.element.color" >@color/title</item >
|
||||
<item name = "album.thumbnail.placeholder" >@color/btn_gray</item >
|
||||
<item name = "album.emptyView" >@drawable/ic_empty_zhihu</item >
|
||||
<item name = "album.emptyView.textColor" >@color/zhihu_album_empty_view</item >
|
||||
<item name = "item.placeholder" >@color/zhihu_item_placeholder</item >
|
||||
<item name = "item.checkCircle.backgroundColor" >@color/theme</item >
|
||||
<item name = "item.checkCircle.borderColor" >@color/zhihu_item_checkCircle_borderColor
|
||||
</item >
|
||||
<item name = "page.bg" >@color/zhihu_page_bg</item >
|
||||
<item name = "bottomToolbar.bg" >@color/zhihu_bottom_toolbar_bg</item >
|
||||
<item name = "bottomToolbar.preview.textColor" >@color/zhihu_bottom_toolbar_preview</item >
|
||||
<item name = "bottomToolbar.apply.textColor" >@color/theme</item >
|
||||
<item name = "preview.bottomToolbar.back.textColor" >@color/btn_gray</item >
|
||||
<item name = "preview.bottomToolbar.apply.textColor" >@color/type_gonglue</item >
|
||||
<item name = "listPopupWindowStyle" >@style/Popup.Zhihu</item >
|
||||
<item name = "capture.textColor" >@color/zhihu_capture</item >
|
||||
</style >
|
||||
<style name="Matisse.Custom" parent="AppCompatTheme.APP">
|
||||
<item name="colorPrimary">@android:color/white</item>
|
||||
<item name="colorPrimaryDark">@color/system_bar</item>
|
||||
<item name="toolbar">@style/Base_ToolbarStyle</item>
|
||||
<item name="album.dropdown.title.color">@color/black</item>
|
||||
<item name="album.dropdown.count.color">@color/zhihu_album_dropdown_count_text</item>
|
||||
<item name="album.element.color">@color/title</item>
|
||||
<item name="album.thumbnail.placeholder">@color/btn_gray</item>
|
||||
<item name="album.emptyView">@drawable/ic_empty_zhihu</item>
|
||||
<item name="album.emptyView.textColor">@color/zhihu_album_empty_view</item>
|
||||
<item name="item.placeholder">@color/zhihu_item_placeholder</item>
|
||||
<item name="item.checkCircle.backgroundColor">@color/theme</item>
|
||||
<item name="item.checkCircle.borderColor">@color/zhihu_item_checkCircle_borderColor
|
||||
</item>
|
||||
<item name="page.bg">@color/zhihu_page_bg</item>
|
||||
<item name="bottomToolbar.bg">@color/zhihu_bottom_toolbar_bg</item>
|
||||
<item name="bottomToolbar.preview.textColor">@color/zhihu_bottom_toolbar_preview</item>
|
||||
<item name="bottomToolbar.apply.textColor">@color/theme</item>
|
||||
<item name="preview.bottomToolbar.back.textColor">@color/btn_gray</item>
|
||||
<item name="preview.bottomToolbar.apply.textColor">@color/type_gonglue</item>
|
||||
<item name="listPopupWindowStyle">@style/Popup.Zhihu</item>
|
||||
<item name="capture.textColor">@color/zhihu_capture</item>
|
||||
</style>
|
||||
|
||||
</resources >
|
||||
</resources>
|
||||
Reference in New Issue
Block a user