how develop this type of layout?
if song playing then it show otherwise not..
which should display over master/Detail.... as well update progress of playing song.
i want it for Android 4.0 or above for both portrait & landscape
Please Help me..
In my opinion you should use FrameLayout. You can declare NavigationDrawer with ListView as the first layout (NavigationDrawer reference) and then a "steering" of music player layout with progressbar as the second. The progress bar can be achieved with a SeekBar.
You can show/hide the second layout programmatically with setVisibility(int visibility)
Here you have a nice reference and tutorial.
Related
I would like to create a custom timebar in exoplayer using PlayerView that:
cannot be dragged by user but only shows the progress in the video
UPDATE: Ok, so I was able to disable dragging by setting the touch_target_height to 0dp!
allows the underlying PlayerView to be clickable (I am losing clickability of PlayerView due to the controller on top)
is always shown on the PlayerView surface (the custom controller appears only on clicking PlayerView once)
I tried using DefaultTimeBar in a custom controller layout but couldn't disable dragging of time bar. Also, the controller is only shown when tapped I have tried the following so far:
On PlayerView component of layout XML, have added the following to disable hiding of controller, but it still requires clicking PlayerView the first time for controller to show up.
app:show_timeout="0"
app:hide_on_touch="false"
I need to capture onClick event on PlayerView which I was able to until I introduced the custom controller layout. I have PlayerView both focusable and clickable
android:focusable="true"
android:clickable="true"
Also, in an attempt to disable dragging of time bar in DefaultTimeBar, I did the following but it only removes the thumb (or scrubber) from the time bar, doesn't disable dragging:
app:scrubber_enabled_size="0dp"
app:scrubber_disabled_size="0dp"
app:scrubber_dragged_size="0dp"
Any ideas on how to do these 3 things?
Thanks,
AB
Regarding the third thing you can try to do it programmatically.
You can ovveride this methods in your DefaultTimeBar:
onScrubStart(...)
onScrubMove(...)
onScrubStop(...)
and implement your logic for each of them (maybe a simple return is enough).
Please check this link for more details: OnScrubListener
My YouTube video shows an overflow menu, full screen, open in YouTube buttons from within the YouTubePlayerView or the YouTubePlayerFragment.
Is there any way to remove those items? I can't find anything in the docs.
Thanks.
Add the style YouTubePlayer.PlayerStyle.CHROMELESS in initialization to completely remove all available controls.
In onInitializationSuccess add ytPlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.CHROMELESS);.
Check here for more details.
Edit : You can add your own controls using either a DialogFragment or Dialog on top of the YoutubePlayer. This will allow you to control playback completely using your own buttons and seekbar. And it does the trick of removing Youtube App Button from player.
Yes You can disable full screen from default player,You need to just use below code with your player object.
//To disable full screen mode.
player.setShowFullscreenButton(false);
Use above line to hide full screen button from your default youtube player.Hope this will work for you.
I am using YoutubePlayerview in android applicaiton, which is almost working fine,But now my need is get seekbar value of youtubeplayerview, Mean if any user drag seek bar , i want to show that value on textview parallelly , is that any way to achieve it
Try this:
youPlayer.getCurrentTimeMillis();
i am inflating a layout over the cameraview . The layout is like this
{ Linerlayout
Relativelayout
YouTubePlayerView }
This inflated layout elements are initilly invisible and on user action these are made visible and i call
youTubeView.initialize()
the initialise finish listenr will call
player.cueVideo(getVideoUrl());
Now i can see the progressindicator first, then i can see the thumbnail of the video with play control on top. When i press that play button , the video start playing but nothing is visible. I can see my cameraview ( ie the view when we open camera )( over which this layout is inflated ) . The video sound is coming and the video is played. Now if i press fullscreen button, it opens video in full screen and here everything is fine. I can see the video . If i go back to small screen again no video only sound.
youTubeView.setVisibility(View.VISIBLE);
toplayerLinearLayout.setVisibility(View.VISIBLE);
toplayerRelLayout.setVisibility(View.VISIBLE);
youTubeView.initialize(DEVELOPER_KEY,
(OnInitializedListener) applicationActivity);
Please give some pointers on what could be happening
Please help as i am totally blocked
The issue was the cameraview . I dont know why youtubeplayer view behaves like this . But i made the GLview ( camera ) invisible before making the youtubeplayerview visible and it is working .
I am trying to do a Music player. Like in some Music player when a song is playing if u touch the screen progress Seekbar will come and after touch_up, after some time that seekbar will automatically slide down. If u again touch the screen it again come back like slide up.
I don't know whether that is a slider or different.
How can i do that in my application. Is there any way?
Thank you.
You can create a Sliding Drawer, Sliding Drawer in android and control it on the touch