I've been always curious to know how does lock screen notification view works on IMO messenger app?
So I did some research and some articles were saying it's custom notification layout and part of RemoteView class. So I went through some quick tutorial and gave it a try but still I am not really sure whether I'm going right way. So, finally I'm asking over here. Do you guys have any idea/suggestion to any library or any other way that I can come up with following outcome?
Desire
Result so far
Zip file- if you wanna take a look at the code
https://drive.google.com/file/d/0B9Y-jPBRm4zyTHZsT09kd3pUU0E/view?usp=sharing
What you see in the navigation bar (just a back and home buttons) indicates that this is an Activity, placed above the lock screen with usage of the FLAG_SHOW_WHEN_LOCKED:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
The styling where it looks like a dialog can be done by theming your Activity, probably using something like android:theme="#style/Theme.AppCompat.Dialog"
Related
Is there a way to replace (or suppress and launch) with my own custom view or App?
Sure go full screen. If you want an example just create new activity and select "fullScreenActivity" then you can view the style and code to own the full screen. However, you can remove the timer delay and animation and just force it right away.
I feel obligated to mention though that building your own status bar sounds wildly out of place. Are you sure you didn't mean the Actionbar? Either way, that is how you accomplish removing the status bar if that really is what you want to do.
For another example of how to do it in XML or Manifest you can see styles here:
https://developer.android.com/training/system-ui/status.html
I am trying to mimic the pop-up notification of WhatsApp.
(If you have not seen it, it might be a bit hard for you to understand this.)
Below is an image to give a clearer perspective.
Some suggested that this might be done using an oridnary activity which has the Theme.Holo.Light.Dialog.Alert theme. However, when I implemented that I got half of the activity full with the views (and the other half) which is supposed to be empty like a dialog, showing a white background. ie, I did not have the dialog feel.
Morever, when the device is in standby mode (power button pressed) and locked, whatsapp is able to bypass that and show the popup dialog (or activity, or whatever) above that.
Any ideas how to implement this ?
Oh god! After hours, I found the solution!
Refer link:http://developer.android.com/guide/topics/ui/dialogs.html#CustomLayout
It's extremely easy, you just need to set up the theme of the activity to #android:style/Theme.Holo.Dialog in manifest like:
<activity android:theme="#android:style/Theme.Holo.Dialog" >
I would like to edit the application menu in Android (where all apps and widgets are displayed).
Like this:
I would like to create an app where you can select how the icons (applications) are shown in this menu. I'm not sure if it is even called "application menu" so I'm having some trouble to find some more info about this matter.
If anyone could help me find a way to override the original layout or point me in the right direction, that would be awesome!
Thanks in advance!
What you are showing in the pic, is called a Launcher.
You can create a custom Launcher. Check this question to get started.
I'm developing an app that includes reviews of items and due to my design, I want to only show all the reviews in a popup window like in Google Play Store:
What should I use to create that white panel that appears over the current window and contains the necessary information? This should be simple but I'm a newbie and I can't seem to figure out what this "widget" is. Please help me if you are familiar with this so I can use this cool design pattern. Thanks.
It seems you want to display a layout as a popup in another activity.
If you want to do this using an Activity instead of a Dialog, you can do this by setting the activity's theme to android:theme="#android:style/Theme.Dialog" in the manifest - this will make the activity appear like a dialog (floating on top of whatever was underneath it).
A better way to do it would be using a DialogFragment. You can display information in the form of a popup and it will have its own lifecycle. That will be much better than displaying an activity like a dialog
Ram kiran's answer is a good one and one which I like to give also. But just so you have another option to look at you can consider PopupWindow
As stated in the docs, it is
A popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.
I've used this and it works out nicely in some situations. It really depends on what your exact needs are as to which will work best for you.
Go Launcher have a nice first-time tutorial. it is very similar to Stock ICS first time run. I want to learn how to make the similar tutorial display at the first launch of my app. How can I implement this Transparent view (which interacts with screen objects) in my android app?
I was trying to do something similar using a transparent activity with a viewpager inside it. I wanted static 'tutorial' images that users could swipe through.
One of the answers to my question mentioned an interesting library (called ShowcaseView). It seems like it may be a good fit for your requirements as well.
https://github.com/Espiandev/ShowcaseView
You can either use a FrameLayout or RelativeLayout as root of your Activity/Fragment, and put your "first time" View upon content with a (almost) transparent background, or use another Activity/Fragment themed with a transluscent window. (like this)
I'd rather use an Activity/Fragment, but this is up to you!
I wrote little library That contains a simple component for making a app tour. It`s very restricted to my case but maybe could be your case . Single LessonCardView Showed onstartactivity for the first time or on button click Any criticism ,help or advice will be appreciated. thanks https://github.com/dnocode/DnoLib
You can implement a first-time user guide with the Spotlight library by TakuSemba.
It is similar to the one shared above and it is still well-maintained (as of 2021).
https://github.com/TakuSemba/Spotlight