I'am using this player as a base for the project:
http://www.androidhive.info/2012/03/android-building-audio-player-tutorial/
I addition to that when I wanted to show different Images (kind of a slideshow) while playing the Audiofile.
Each image has a starttime and duration value.
I've archieved to play this slideshow of images, but with the problem, that I can't stop or pause it.
My Goal is an ImageView where I can controll the shown Image over the seekbar and the Play and Pause function, so that every Image will be shown at the right time while scrolling through the seekbar. (Same like the Audio file gets controlled kind of)
Right know I'm kind of stuck and need some approach to continue my work.
Anybody an idea how to solve this?
Related
I am creating a project like youtube shorts.
where i have implemented Viewpager2(modal contains only videoview) with RecyclerviewAdapter, everything is ok, but problem is when we swiping both video playing at same time, and some stuck in intial point of scrolling.
So, 1. how to play one video at a time only when screen is fully visible, and second video which coming by scrolling remain pauses or black screen until screen is fully visible?
for smoothness i tried setoffpagelimit method, it plays multiple audio without any scrolling, i think with the solution of first question 2nf question also will solved.
I am new to android. I have a lottie json file and based upon a seekbar want to control the amount of animation it is showing like at 0 the animation should start and at 50 it should show only 50 and finish at 100 also .
I havent tried anything so far as have no clue on this.
You can't control lottie animation file with seekbar.
But you can edit your lottie animation file here
I'm trying to fade my image alpha from 1 to 0 by 2000ms but it seems like it goes rather quickly like half a second. Here's my code:
ImageView tom = (ImageView) findViewById(R.id.imgJerry);
tom.animate().alpha(0f).setDuration(2000);
I'm following a lesson from Udemy and they got it work fine.
You should use Animation on it. Declare the animation in xml and its duration and then refer this in to Code.Yes previous answer is correct..
How to do a fadein of an image on an Android Activity screen?
For those who also face the same problem make sure that you turn on Animation in the developer setting in your android phone.
I've been turn it off for a while and just turn it back to 1x or 0.5x is enough.
i need make a video in android with few Pictures (a black image with a text) and i need that every image have a 2 seconds duration.
I tried with jcodec, but i cant make it.
How is the best way to make it?
Thanks in advance
You can always make an application that does that in Eclipse of Android Studios. For the basic algorithm, upon the user clicking a button "start", you can move on to the next activity. After this activity starts, you can cycle through a series of images with text, and use some type of time loop, so that the array will go from one item to the next in 2 seconds.
How can I switch the screen and still save the progress of the current game? For example I have an additional screen, when you press tab key, that shows some information about the player (attributes, stats, etc.), but when you switch the screen again to resume your game the show method is called again and you lose everything... The only method I know is that before you hide the screen to save the game in some format and load it in show but I highly doubt that this is the proper way to do it, as there would be a real performance issue when you switch the screens very fast... I need a way to keep the data from the previous screen and not initialize it every time the screen is showed. This would also apply to the skill tree and inventory which also needs to be saved for the entire game session. The filed loading from save game file format should be done only once not every time a screen changes. Any ideas?