Commit 9f013f96 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

add biganto plaer module

parent 37e68aaf
...@@ -21,7 +21,7 @@ android { ...@@ -21,7 +21,7 @@ android {
defaultConfig { defaultConfig {
applicationId $APPLICATION_ID applicationId $APPLICATION_ID
ndk { ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' abiFilters 'armeabi-v7a', 'arm64-v8a'
} }
minSdkVersion minSdkVersion_RoomPark minSdkVersion minSdkVersion_RoomPark
targetSdkVersion targetSdkVersion_RoomPark targetSdkVersion targetSdkVersion_RoomPark
......
...@@ -26,6 +26,12 @@ ...@@ -26,6 +26,12 @@
</activity> </activity>
<activity android:name=".player.BigantoPlayerActivity" android:screenOrientation="fullSensor"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
android:largeHeap="true"
android:hardwareAccelerated="true" android:process=":UnityKillsMe"> </activity>
<service <service
android:name=".data.RoomParkMessageService" android:name=".data.RoomParkMessageService"
android:enabled="true" android:enabled="true"
......
gfx-enable-native-gfx-jobs=
wait-for-native-debugger=0
scripting-runtime-version=latest
vr-enabled=1
vr-device-list=None,cardboard
package com.biganto.visual.roompark.player
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.pm.ActivityInfo
import android.content.res.Configuration
import android.graphics.drawable.Drawable
import android.os.Bundle
import android.os.Handler
import android.view.OrientationEventListener
import android.view.View
import android.view.animation.AccelerateInterpolator
import android.view.animation.AlphaAnimation
import android.view.animation.Animation
import android.view.animation.Animation.AnimationListener
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.ProgressBar
import androidx.vectordrawable.graphics.drawable.Animatable2Compat
import androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat
import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.player.unity_utils.IBigantoUnityPlugin
import com.biganto.visual.roompark.player.unity_utils.LoadTourConfig
import com.biganto.visual.roompark.player.unity_utils.UnityOrientation
import com.biganto.visual.roompark.player.unity_utils.requests_raw.UPBaseRequest
import com.biganto.visual.roompark.player.unity_utils.requests_raw.UPBuildTourRequest
import com.biganto.visual.roompark.player.unity_utils.requests_raw.UPChangeOrientationRequest
import com.bumptech.glide.Glide
import com.google.gson.GsonBuilder
import com.unity3d.player.UnityPlayer
import kotlinx.android.synthetic.main.activity_biganto_player.*
//import kotlinx.android.synthetic.main.activity_biganto_player.*
import timber.log.Timber
const val PLAY_TOUR_DATA_EXTRAS="BIGANTO_PLAYER_TOUR_DATA"
const val ERROR_TOUR_BUILD_FINISH_CODE=8601
const val UNITY_SCENE_LOADED_FADE_MILLS=600L
private fun UPBaseRequest.requestToJson():String{
return GsonBuilder().create().toJson(this, javaClass)
}
class BigantoPlayerActivity : Activity(), UnityResponseListener {
lateinit var preview: ImageView
lateinit var previewBackground: FrameLayout
lateinit var biganto: ImageView
lateinit var progress: ProgressBar
lateinit var container: FrameLayout
lateinit var unityContainer: FrameLayout
private var mUnityPlayer: UnityPlayer? = null
private var bigantoPluginListener: IBigantoUnityPlugin? = null
private lateinit var orientationListener: OrientationListener
// @Inject
// lateinit var appLifeCycle: AppLifecycleListener
private lateinit var tourObj: LoadTourConfig
override fun onCreate(savedInstanceState: Bundle?) {
Timber.d("CREATING PLAYER ACTIVITY")
super.onCreate(savedInstanceState)
orientationListener = OrientationListener(this)
// appLifeCycle = BigantoApplication.component.appLifeCycle()
//
// ProcessLifecycleOwner.get().lifecycle
// .addObserver(appLifeCycle)
setContentView(R.layout.activity_biganto_player)
container = this.frameContainer
unityContainer = this.unityFrameContainer
preview = this.playerPreview
previewBackground = this.previewBack
biganto = this.bigantoLogo
progress = this.loadingBar
if (mUnityPlayer == null) {
mUnityPlayer = UnityPlayer(this)
}
tourObj = intent.getParcelableExtra(PLAY_TOUR_DATA_EXTRAS)
val animated = AnimatedVectorDrawableCompat.create(this, R.drawable.biganto_splash_anim)
animated?.registerAnimationCallback(object : Animatable2Compat.AnimationCallback() {
override fun onAnimationEnd(drawable: Drawable?) {
biganto.post { animated.start() }
}
})
biganto.setImageDrawable(animated)
animated?.start()
Glide.with(this)
.load(tourObj.previewUri)
// .centerCrop()
.into(preview)
.also {
fadeOutAndHideImage(1f, 0f, 1500, biganto)
Handler().postDelayed(
{
fadeOutAndHideImage(0f, 1f, 1500, preview)
}
, 1200
)
}
}
private fun fadeOutAndHideImage(from: Float, to: Float, duration: Long, img: ImageView) {
val fadeOut = AlphaAnimation(from, to)
fadeOut.interpolator = AccelerateInterpolator()
fadeOut.duration = duration
fadeOut.setAnimationListener(object : AnimationListener {
override fun onAnimationEnd(animation: Animation) {
if (from > to) img.visibility = View.GONE
}
override fun onAnimationRepeat(animation: Animation) {}
override fun onAnimationStart(animation: Animation) {
if (from < to) img.visibility = View.VISIBLE
}
})
img.startAnimation(fadeOut)
}
private fun quitPlayer(){
mUnityPlayer?.stop()
mUnityPlayer?.quit()
}
override fun onBackPressed() {
finish()
}
override fun onDestroy() {
quitPlayer()
super.onDestroy()
}
/**
* invokes from unity by AndroidJavaObject mechanics
*/
fun setUnityPlayerListener(listener: IBigantoUnityPlugin) {
this.bigantoPluginListener = listener
// Timber.d(" UNITY SETTING LISTENER THROGH ACTIVITY")
}
override fun unitySceneLoaded() {
runOnUiThread {
preview.visibility = View.VISIBLE
}
mUnityPlayer?.view?.visibility = View.VISIBLE
bigantoPluginListener?.sendUnityTourBuildRequest(UPBuildTourRequest(tourObj).requestToJson())
}
override fun unityTourBuilded() {
runOnUiThread {
//preview.visibility = View.GONE
fadeOutAndHideImage(1f, 0f, UNITY_SCENE_LOADED_FADE_MILLS, preview)
progress.visibility = View.GONE
previewBackground.visibility = View.GONE
biganto.visibility = View.GONE
}
mUnityPlayer?.view?.visibility = View.VISIBLE
}
override fun unityTourBuildFailed() {
Timber.d("Tour build failed! Finishing activity...")
finish()
}
override fun unityTourBuildProgress(progress: Int, total: Int) {
runOnUiThread {
preview.visibility = View.VISIBLE
}
mUnityPlayer?.view?.visibility = View.VISIBLE
}
override fun unityCrushed(message: String) {
runOnUiThread {
preview.visibility = View.VISIBLE
}
mUnityPlayer?.view?.visibility = View.VISIBLE
}
override fun onNewIntent(intent: Intent) {
Timber.d("PLAYER ACTIVITY GOT INTNET")
// To support deep linking, we need to make sure that the client can get access to
// the last sent intent. The clients access this through a JNI api that allows them
// to get the intent set on launch. To update that after launch we have to manually
// replace the intent with the one caught here.
setIntent(intent)
}
// Pause Unity
override fun onPause() {
super.onPause()
mUnityPlayer?.pause()
}
// Resume Unity
override fun onResume() {
Timber.d("PLAYER ACTIVITY RESUME")
super.onResume()
mUnityPlayer?.resume()
}
override fun onStart() {
super.onStart()
orientationListener.enable()
if (mUnityPlayer?.view?.parent != null) return
mUnityPlayer?.start()
unityContainer.addView(mUnityPlayer?.view)
}
override fun onStop() {
orientationListener.disable()
bigantoPluginListener = null
mUnityPlayer?.stop()
super.onStop()
}
// Low Memory Unity
override fun onLowMemory() {
super.onLowMemory()
mUnityPlayer?.lowMemory()
}
// Trim Memory Unity
override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
if (level == TRIM_MEMORY_RUNNING_CRITICAL) {
mUnityPlayer?.lowMemory()
}
}
// This ensures the layout will be correct.
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
mUnityPlayer?.configurationChanged(newConfig)
}
// Notify Unity of the focus change.
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
mUnityPlayer?.windowFocusChanged(hasFocus)
}
//Uncomment this, if you want control backstack inside Unity engine
// // For some reason the multiple keyevent type is not supported by the ndk.
// // Force event injection by overriding dispatchKeyEvent().
// override public boolean dispatchKeyEvent(KeyEvent event)
// {
// if (event.getAction() == KeyEvent.ACTION_MULTIPLE)
// return mUnityPlayer.injectEvent(event);
// return super.dispatchKeyEvent(event);
// }
//
// Pass any events not handled by (unfocused) views straight to UnityPlayer
// override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean {
// return mUnityPlayer?.injectEvent(event) ?: false;
// }
//
// override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
// return mUnityPlayer?.injectEvent(event) ?: false
// }
//
// override fun onTouchEvent(event: MotionEvent): Boolean {
// return mUnityPlayer?.injectEvent(event) ?: false
// }
// /*API12*/ public boolean onGenericMotionEvent(MotionEvent event) { return mUnityPlayer.injectEvent(event); }
inner class OrientationListener(context: Context) : OrientationEventListener(context) {
private val ROTATION_O = 1
private val ROTATION_90 = 2
private val ROTATION_180 = 3
private val ROTATION_270 = 4
var rotation = 0
override fun onOrientationChanged(orientation: Int) {
var newRotation = rotation
if ((orientation < 35 || orientation > 325) && rotation != ROTATION_O) { // PORTRAIT
newRotation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
} else if (orientation in 146..214 && rotation != ROTATION_180) { // REVERSE PORTRAIT
newRotation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
} else if (orientation in 56..124 && rotation != ROTATION_270) { // REVERSE LANDSCAPE
newRotation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
} else if (orientation in 236..304 && rotation != ROTATION_90) { //LANDSCAPE
newRotation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
}
if (newRotation != rotation) {
rotation = newRotation
// UnityBridge.runOnUnityThread {
Timber.d("Unity change orientation request")
// UnityBridge.runOnUnityThread { bigantoPluginListener?.sendUnityChangeOrientationRequest(rotation.toUnityOrientationId().requestToJson()) }
// }
}
}
fun Int.toUnityOrientationId(): UPChangeOrientationRequest {
val orId = when (this) {
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT -> UnityOrientation.Portrait
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE -> UnityOrientation.LandscapeLeft
ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE -> UnityOrientation.LandscapeRight
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT -> UnityOrientation.PortraitUpsideDown
else -> UnityOrientation.Portrait
}
return UPChangeOrientationRequest(orId)
}
}
}
interface UnityResponseListener{
fun unitySceneLoaded()
fun unityTourBuilded()
fun unityTourBuildProgress(progress:Int, total:Int)
fun unityCrushed(message:String)
fun unityTourBuildFailed()
}
\ No newline at end of file
package com.biganto.visual.roompark.player.unity_utils
import android.content.Context
import com.unity3d.player.UnityPlayer
/**
* Created by Vladislav Bogdashkin on 08.08.2018.
*/
class BigantoTourPlayer(p0: Context) : UnityPlayer(p0)
{
// val title = "Bigant Visual Tour Player"
// override fun kill() {
//// }
}
\ No newline at end of file
package com.biganto.visual.roompark.player.unity_utils;
public interface IBigantoUnityPlugin{
public void sendUnitySceneLoadRequest(String request);
public void sendUnityTourBuildRequest(String request);
public void sendUnityFinishRequest(String request);
public void sendUnityPauseRequest(String request);
public void sendUnityErrorRequest(String request);
public void sendUnityChangeOrientationRequest(String request);
// void onTourSceneLoaded();
// void onTourScenePrepared(TourPlayerCallback callback);
// void onTourLoaded(TourReadyCallback callback);
}
package com.biganto.visual.roompark.player.unity_utils
import android.os.Parcel
import android.os.Parcelable
/**
* Created by Vladislav Bogdashkin on 08.05.2019.
*/
data class LoadTourConfig(
val tourId:Int,
val targetResolution:Int,
val cacheFolderUri:String,
val metaUri:String,
val previewUri:String?,
val AllowVR:Boolean,
val AllowDollhouse:Boolean) : Parcelable {
constructor(parcel: Parcel) : this(
parcel.readInt(),
parcel.readInt(),
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readInt()!= 0,
parcel.readInt() == 1
)
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeInt(tourId)
parcel.writeInt(targetResolution)
parcel.writeString(cacheFolderUri)
parcel.writeString(metaUri)
parcel.writeString(previewUri)
parcel.writeInt(if (AllowVR)1 else 0 )
parcel.writeInt(if (AllowDollhouse)1 else 0)
}
override fun describeContents(): Int {
return 0
}
companion object CREATOR : Parcelable.Creator<LoadTourConfig> {
override fun createFromParcel(parcel: Parcel): LoadTourConfig {
return LoadTourConfig(parcel)
}
override fun newArray(size: Int): Array<LoadTourConfig?> {
return arrayOfNulls(size)
}
}
}
\ No newline at end of file
package com.biganto.visual.roompark.player.unity_utils;
import android.os.Handler;
import timber.log.Timber;
/**
* Created by Vladislav Bogdashkin on 23.08.2018.
*/
public final class UnityBridge {
// Содержит ссылку на C# реализацию интерфейса
// Перенаправляет вызов в Unity поток
private static Handler unityMainThreadHandler;
// Функция перевода выполнения в Unity поток, потребуется в дальнейшем
public static void runOnUnityThread(Runnable runnable) {
if (unityMainThreadHandler != null && runnable != null) {
unityMainThreadHandler.post(runnable);
}
}
public static void unRegisterHandler() {
if(unityMainThreadHandler != null)
unityMainThreadHandler.getLooper().quit();
unityMainThreadHandler=null;
}
public static void registerHandler() {
Timber.d(" handler: %s",unityMainThreadHandler );
if(unityMainThreadHandler == null) {
// Так как эту функцию вызываем всегда на старте Unity,
// этот вызов идет из нужного нам в дальнейшем потока,
// создадим для него Handler
unityMainThreadHandler = new Handler();
}
Timber.d(" handler: %s",unityMainThreadHandler );
}
}
\ No newline at end of file
package com.biganto.visual.roompark.player.unity_utils;
import com.google.gson.annotations.SerializedName;
public enum UnityLayoutViewState{
@SerializedName("0")
BINDING (0),
@SerializedName("1")
READY (1),
@SerializedName("2")
DETACHED (2),
@SerializedName("3")
DESTROYED (3);
private final int value;
public int getValue() {
return value;
}
private UnityLayoutViewState(int value) {
this.value = value;
}
}
package com.biganto.visual.roompark.player.unity_utils;
/**
* Created by Vladislav Bogdashkin on 28.08.2018.
*/
public enum UnityOrientation {
Unknown (0),
// Portrait orientation.
Portrait (1),
// Portrait orientation, upside down.
PortraitUpsideDown (2),
// Landscape orientation, counter-clockwise from the portrait orientation.
LandscapeLeft (3),
LandscapeRight (4),
// Auto-rotates the screen as necessary toward any of the enabled orientations.
AutoRotation (5);
int id;
private UnityOrientation(int i){id = i;}
public int GetID(){return id;}
public boolean IsEmpty(){return this.equals(UnityOrientation.Unknown);}
public boolean Compare(int i){return id == i;}
public static UnityOrientation GetValue(int _id)
{
UnityOrientation[] As = UnityOrientation.values();
for (UnityOrientation A : As) {
if (A.Compare(_id))
return A;
}
return UnityOrientation.Unknown;
}
}
package com.biganto.visual.roompark.player.unity_utils;
import com.google.gson.annotations.SerializedName;
public enum UnityPlayerViewState{
@SerializedName("0")
NotInitialized(0),
@SerializedName("1")
PreLoading(1),
@SerializedName("2")
Ready(2),
@SerializedName("3")
Error(3);
private final int value;
public int getValue() {
return value;
}
private UnityPlayerViewState(int value) {
this.value = value;
}
}
package com.biganto.visual.roompark.player.unity_utils.requests_raw;
/**
* Created by Vladislav Bogdashkin on 20.08.2018.
*/
//Unity Player base communication request
public class UPBaseRequest {
}
package com.biganto.visual.roompark.player.unity_utils.requests_raw;
import com.biganto.visual.roompark.player.unity_utils.LoadTourConfig;
/**
* Created by Vladislav Bogdashkin on 20.08.2018.
*/
public class UPBuildTourRequest extends UPBaseRequest{
public int TourId;
public int TargetResolution;
public String AssetsDirectory;
public String MetaPredict;
public String tour_preview;
public Boolean AllowVR=true;
public Boolean AllowDollhouse=true;
public UPBuildTourRequest(){}
public UPBuildTourRequest(
int tour_id,
int target_tex_resolution,
String sd_core_folder_uri,
String meta_file_path,
String tour_preview,
boolean allow_vr,
boolean allow_dollhouse
) {
this.TourId = tour_id;
this.TargetResolution = target_tex_resolution;
this.AssetsDirectory = sd_core_folder_uri;
this.MetaPredict = meta_file_path;
this.tour_preview = tour_preview;
this.AllowVR = allow_vr;
this.AllowDollhouse = allow_dollhouse;
}
public UPBuildTourRequest(LoadTourConfig tour) {
this(tour.getTourId(), tour.getTargetResolution(), tour.getCacheFolderUri(),
tour.getMetaUri(), tour.getPreviewUri(),tour.getAllowVR(),tour.getAllowDollhouse());
}
}
package com.biganto.visual.roompark.player.unity_utils.requests_raw;
import com.biganto.visual.roompark.player.unity_utils.UnityOrientation;
/**
* Created by Vladislav Bogdashkin on 20.08.2018.
*/
public class UPChangeOrientationRequest extends UPBaseRequest {
UnityOrientation orientation;
public UPChangeOrientationRequest(){orientation=UnityOrientation.Portrait;}
public UPChangeOrientationRequest(UnityOrientation orientation){this.orientation=orientation;}
}
package com.biganto.visual.roompark.player.unity_utils.requests_raw;
/**
* Created by Vladislav Bogdashkin on 20.08.2018.
*/
public class UPFinishRequest extends UPBaseRequest{
}
package com.biganto.visual.roompark.player.unity_utils.requests_raw;
/**
* Created by Vladislav Bogdashkin on 20.08.2018.
*/
public class UPPauseRequest extends UPBaseRequest {
}
package com.biganto.visual.roompark.player.unity_utils.requests_raw;
/**
* Created by Vladislav Bogdashkin on 20.08.2018.
*/
public class UPSceneLoadingRequest extends UPBaseRequest{
}
...@@ -7,18 +7,14 @@ import android.view.Menu ...@@ -7,18 +7,14 @@ import android.view.Menu
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.NonNull import androidx.annotation.NonNull
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.contains import androidx.core.view.contains
import androidx.core.view.get import androidx.core.view.get
import androidx.viewpager.widget.PagerAdapter import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import com.biganto.visual.roompark.base.ICollapsingToolBar
import com.biganto.visual.roompark.base.IConductorActivity
import com.bluelinelabs.conductor.Controller import com.bluelinelabs.conductor.Controller
import com.bluelinelabs.conductor.Router import com.bluelinelabs.conductor.Router
import com.bluelinelabs.conductor.RouterTransaction import com.bluelinelabs.conductor.RouterTransaction
import com.google.android.material.bottomnavigation.BottomNavigationView import com.google.android.material.bottomnavigation.BottomNavigationView
import timber.log.Timber
/** /**
* Created by Vladislav Bogdashkin on 11.10.2019. * Created by Vladislav Bogdashkin on 11.10.2019.
...@@ -119,53 +115,8 @@ class BNVRouterPagerAdapter( ...@@ -119,53 +115,8 @@ class BNVRouterPagerAdapter(
router.backstack.forEach { it.controller().setOptionsMenuHidden(false) } router.backstack.forEach { it.controller().setOptionsMenuHidden(false) }
currentPrimaryRouter = router currentPrimaryRouter = router
} }
drawToolbar(position)
} }
fun drawToolbar(position: Int){
return
val toolBar = currentPrimaryRouter?.activity as ICollapsingToolBar
toolBar.showAll()
toolBar.appBar.setExpanded(false,true)
toolBar.appBar.setLiftable(true)
toolBar.appBar.setLifted(true)
toolBar.appBarScrollable(false)
toolBar.topAppBar.title = when(position){
0 -> "dsfsdf"
1 -> "ИЗБРАННОЕ"
2 -> "МОИ СДЕЛКИ"
3 -> "СМОТРЕТЬ\nКВАРТИРУ"
4 -> "НАСТРОЙКИ"
else -> ""
}
// toolBar.appBar.visibility=View.VISIBLE
val cc = (currentPrimaryRouter?.activity as IConductorActivity)
Timber.d(" posicione $position")
when(position){
0 -> {
Timber.d(" IN POSOIITION 0 ")
// toolBar.appBar.visibility = Toolbar.GONE;
// toolBar.topAppBar.visibility = View.GONE;
val params: CoordinatorLayout.LayoutParams = cc.conductorContainer.layoutParams as CoordinatorLayout.LayoutParams
params.behavior = null
}
1 ->{}
2 ->{}
3 -> {
toolBar.appBar.setLifted(false)
toolBar.appBar.setLiftable(false)
}
4 ->{}
else -> {}
}
}
override fun isViewFromObject(view: View, router: Any): Boolean { override fun isViewFromObject(view: View, router: Any): Boolean {
require(router is Router) { "Non-router object in router stack!" } require(router is Router) { "Non-router object in router stack!" }
......
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
<vector
android:name="vector"
android:width="128dp"
android:height="148dp"
android:viewportWidth="128"
android:viewportHeight="148">
<path
android:name="path"
android:pathData="M 51.2 125.075 L 51.2 81.005 L 12.8 58.925 L 12.8 102.995 L 51.2 125.075 Z M 64 73.6 L 64 147.2 L 0 110.4 L 0 0 L 12.8 7.36 L 12.8 44.152 L 64 73.6 Z"
android:fillColor="#b4272d"
android:fillAlpha="0"
android:strokeWidth="1"/>
<path
android:name="path_1"
android:pathData="M 85.28 61.28 L 85.28 134.88 L 72.48 127.52 L 72.48 68.692 L 21.28 39.492 L 21.28 24.164 Z"
android:fillColor="#b4272d"
android:fillAlpha="0"
android:strokeWidth="1"/>
<path
android:name="path_2"
android:pathData="M 106.404 48.557 L 106.404 122.157 L 93.604 114.797 L 93.604 55.969 L 42.404 26.77 L 42.404 11.441"
android:fillColor="#b4272d"
android:fillAlpha="0"
android:strokeWidth="1"/>
<path
android:name="path_3"
android:pathData="M 127.37 36.24 L 127.37 109.84 L 114.57 102.48 L 114.57 43.652 L 63.37 14.452 L 63.37 -0.876 Z"
android:fillColor="#b4272d"
android:fillAlpha="0"
android:strokeWidth="1"/>
</vector>
</aapt:attr>
<target android:name="path">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="fillAlpha"
android:duration="250"
android:valueFrom="0"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:anim/accelerate_interpolator"/>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="1000"
android:duration="250"
android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:anim/decelerate_interpolator"/>
</set>
</aapt:attr>
</target>
<target android:name="path_1">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="178"
android:duration="343"
android:valueFrom="0"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:anim/linear_interpolator"/>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="1250"
android:duration="250"
android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:anim/decelerate_interpolator"/>
</set>
</aapt:attr>
</target>
<target android:name="path_2">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="453"
android:duration="378"
android:valueFrom="0"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:anim/linear_interpolator"/>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="1500"
android:duration="250"
android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:anim/decelerate_interpolator"/>
</set>
</aapt:attr>
</target>
<target android:name="path_3">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="646"
android:duration="438"
android:valueFrom="0"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:anim/linear_interpolator"/>
<objectAnimator
android:propertyName="fillAlpha"
android:startOffset="1750"
android:duration="250"
android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:anim/decelerate_interpolator"/>
</set>
</aapt:attr>
</target>
</animated-vector>
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/frameContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".player.BigantoPlayerActivity">
<FrameLayout
android:id="@+id/unityFrameContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
</FrameLayout>
<FrameLayout
android:id="@+id/previewBack"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
</FrameLayout>
<ImageView
android:id="@+id/playerPreview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@color/colorPrimary"
android:visibility="invisible" />
<ImageView
android:id="@+id/bigantoLogo"
android:layout_width="148dp"
android:layout_height="128dp"
android:scaleType="fitCenter"
android:layout_gravity="center"
/>
<ProgressBar
android:id="@+id/loadingBar"
style="@style/BigantoProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_margin="16dp" />
</FrameLayout>
\ No newline at end of file
...@@ -452,7 +452,11 @@ ...@@ -452,7 +452,11 @@
<item name="android:text">@string/download_tour_cancel_text</item> <item name="android:text">@string/download_tour_cancel_text</item>
</style> </style>
<style name="BigantoProgressBar">
<item name="android:layout_width">@dimen/default_icon_width</item>
<item name="android:layout_height">@dimen/default_icon_height</item>
<item name="android:indeterminateTint">@color/colorPrimary</item>
</style>
</resources> </resources>
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