I saw that youtube app can minimize to small window that displays over all other windows.
I want to do the same with my app.
What strings in manifest (or any other string) do it?
Thanks,
I am about this:
Take a look at google documentation about this topic, it is called picture-in-picture
You need to add the first two lines to your activity which will handle Picture in Picture (PIP) mode.
The third line needs to be added so that your activity will not relaunch once layout changes occur, such as device screen rotation.
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
You can find more information about this in the android documentation.
Here is a tutorial on how to implement it.
You can refer to the following tutorials which are nice to understand
picture in picture feature
https://medium.com/#mujtahidah/making-picture-in-picture-android-4120ac73efb4
http://www.zoftino.com/android-picture-in-picture-mode-example
Related
image
I am sharing a link from another app like youtube to my app but Now it opens my app and then saves the link. My need is to not save the link without opening the app
There are two solutions:
You don't need dialog or anything like it. Just make the activity fully transparent, process data and finish it. Optionally, you can show Toast as a feedback. It would look and feel like everything is processed in the background.
You need dialog or some kind of UI. For this, you can use floating windows that you can show over other apps. Many apps use this approach such as Pocket, etc. There is complete guide on how to do it: https://localazy.com/blog/floating-windows-on-android-1-jetpack-compose-room
I am working on a application , it is having an pass code screen with 4 digits. How to set pass code like that screen and when I open the app I need to show the pass code screen in order to open the application.
Thank you.
first you need to google out something before you ask any question..any way this may help you JUST START your THOUGHT.
How can i set up screen lock with a password programmatically?
I'm just getting started with Android dev, done a few tutorials, now I'm working on a simple app. On both the emulator and my phone (Android 4.0.3 emulator, Android 4.1.1 Atrix HD) apps are displaying in what I think is Holo Light. I'd rather have it be Holo Dark, but when I add the following line to the application block in the Android Manifest file: android:theme="#android:style/Theme.Holo" the app compiles fine but force closes as soon as I open it.
What am I doing wrong? I'm sure it's something really simple, but as I said I'm new to this. Thanks in advance, y'all!
If you want to use a theme for all the activities of your application then you need to use
<application android:theme="#style/CustomTheme">
in AndroidManifest.xml.If you want a theme applied to just one Activity in your application, then add the android:theme attribute to the activity tag instead.So need to know what type you use in your application.However see these things which will clear you more..
http://developer.android.com/guide/topics/ui/themes.html
http://www.androidengineer.com/2010/06/using-themes-in-android-applications.html
The simplest thing you can do and you should always do is to read logs why does it crash. The log will tell you the reason of you crash. Please post the reason including logs from Logcat and only then ask about fixes:)
i am iOS app developer. Now when i created an app on iOS i want to do the same on android. With java i was familiar just now need some time to remember.
i was looking at some tutorial how to do one or other things. But what i can't find is the basics how everything works. How classes is interacting with each other.
For example i want to create registration window with few buttons and alerts.
I want registration window to be called just once when app is installed and just that.
Should i create new java class and few layouts, one for View with buttons and other for Alerts ?
Or should i create other class for alerts if i need them in other flow of my app ?
And how i should call that window with registration from my main class, which is
extends Activity
Also if there are some developers who came this road from objective-c (iOS) to java (android). It would be nice for some share experience how they did that.
Thank you for any help :)
Very few of the concepts in iOS and Android are similar. On Android you have Activites, Intendts the Manifest. When you design your layout it should be resolution independent. You have a search, back and a menu button and variable hardware. All of this has no equivalent in iOS.
That said, I think you just have to read the basic concepts and the getting started guide no matter if you come from iOS or never have done mobile development before.
EDIT
To answer your concrete question. Take a look at the lifecycle of an Activity and Preferences. With this, you could do some action on the first start of your main Activity and store some flag in the preferences when it's done. On the next start you just test that preference and skip the logic.
You can create one activity (.java file) and one layout(.xml file with buttons and input boxes) , alerts could be toast notifications:
http://developer.android.com/guide/topics/ui/notifiers/toasts.html
All you require for this is a activity and a layout xml for that activity, this activity will be your main ie the entry point to your application, in that activity oncreate method you can check if it is registered or not by setting a flag or something which will direct to the next activity if its registered.
GOOD LUCK...
Just like your nibs in iPhone you create xml layouts in Android. And for view controllers here you make activity. One important thing is AndroidManifest.xml file, it contains all information of your app (like plist) plus all the activity information(Intent type and launcher methods).
I'm a new user to this interesting forum!
I want start developing an application for android and before starting i want learn about some android features...
The first android feature is how to correlate finger motion on the screen with java...
Are there any source code examples that show how to draw with your finger on an android screen?
Can you suggest a good place for me to download an example?
thanks
The ApiDemos that come with the SDK have an example called TouchPaint that does exactly this... it's a simple little finger drawing app. The source is actually very easy to read and it shows all of the basics.
Check out this tutorial on drawing with a canvas in Android. There are some source code examples there for you as well.
Also, the Android developer's guide and tutorials on the Google site are great. That's what I started with.