Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
Mostrar barra de herramientas en la actividad de Youtube (YouTubeBaseActivity)

Este es mi xml:

 <RelativeLayout 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:layout_width="match_parent" android:layout_height="match_parent" android:padding="16dp"> <com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtube_view" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </RelativeLayout>

Esta es mi actividad de videos

 public class VideosActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener, YouTubePlayer.PlaybackEventListener {}

Cómo agregar la barra de herramientas para esta actividad

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Este código solo funciona en un nivel de API superior a 21

en su código de barra de herramientas de lugar XML

 <Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" android:theme="@style/ThemeOverlay.AppCompat.Light" app:popupTheme="@style/AppTheme"> </Toolbar>

En tu conjunto YouTubeBaseActivity La barra de herramientas

 Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setActionBar(toolbar);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!