تخصيص وتعديل شكل ExoPlayer - Customize ExoPlayer

نتيجة بحث الصور عن ‪exoplayer‬‏

السلام عليكم

هنتكلم النهاردة ازاى نغير ونعدل من شكل ExoPlayer controllers 
الموضوع كله ان الكنترولز دول موجودين في فايل اسمه exo_playback_control_view.xml 
فلو عايزين نعدل فيه هنعمل فايل بنفس الاسم ونعدل فيه بنعمل override يعنى 
وانا جايبلكم الفايل الاصلي يعنى عشان الموضوع يبقي اسهل لو بتغير في الوان او اشكال الbuttons 

الفايل اهو 

هنا الخلفية اخضر شفاف انا معدلها 😆

<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2016 The Android Open Source Project     Licensed under the Apache License, Version 2.0 (the "License");     you may not use this file except in compliance with the License.     You may obtain a copy of the License at          http://www.apache.org/licenses/LICENSE-2.0     Unless required by applicable law or agreed to in writing, software     distributed under the License is distributed on an "AS IS" BASIS,     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.     See the License for the specific language governing permissions and     limitations under the License.--><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_height="match_parent"    android:layout_width="match_parent"    xmlns:tools="http://schemas.android.com/tools">
    <TextView        android:id="@+id/video_title"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:background="#817ba237"        tools:text="Test Test Test "        android:padding="10dp"        android:textColor="#fff"        android:textSize="19sp"        android:gravity="center"
        />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="wrap_content"    xmlns:app="http://schemas.android.com/apk/res-auto"    android:layout_alignParentBottom="true"    android:layoutDirection="ltr"    android:background="#817ba237"    android:orientation="vertical">

    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:gravity="center"        android:paddingTop="10dp"        android:orientation="horizontal">

        <ImageButton android:id="@id/exo_prev"            android:layout_height="20dp"            style="@style/ExoMediaButton.Previous"/>

        <ImageButton android:id="@id/exo_rew"            android:layout_height="20dp"            style="@style/ExoMediaButton.Rewind"/>

        <ImageButton android:id="@id/exo_play"            android:layout_height="20dp"            style="@style/ExoMediaButton.Play"/>

        <ImageButton android:id="@id/exo_pause"            android:layout_height="20dp"            style="@style/ExoMediaButton.Pause"/>

        <ImageButton android:id="@id/exo_ffwd"            android:layout_height="20dp"            style="@style/ExoMediaButton.FastForward"/>

        <ImageButton android:id="@id/exo_next"            android:layout_height="20dp"            style="@style/ExoMediaButton.Next"/>

    </LinearLayout>

    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginTop="4dp"        android:gravity="center_vertical"        android:orientation="horizontal">

        <TextView android:id="@id/exo_position"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:textSize="14sp"            android:textStyle="bold"            android:paddingLeft="4dp"            android:paddingRight="4dp"            android:includeFontPadding="false"            android:textColor="#FFBEBEBE"/>

        <com.google.android.exoplayer2.ui.DefaultTimeBar            android:id="@id/exo_progress"            android:layout_width="0dp"            android:layout_weight="1"            app:buffered_color="#0ff"            android:layout_height="26dp"/>

        <TextView android:id="@id/exo_duration"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:textSize="14sp"            android:textStyle="bold"            android:paddingLeft="4dp"            android:paddingRight="4dp"            android:includeFontPadding="false"            android:textColor="#FFBEBEBE"/>

    </LinearLayout>

</LinearLayout>
    </RelativeLayout>

اي استفسار سيب كومنت 
وبرضو متنسوش الشير والسبسكرايب والفولو :D

1 comments:

اضف تعليق
23 يونيو 2018 في 2:43 م

? How can i control with buffering

رد
avatar