I'm sorry for such a silly question, but I can not fathom the name of this component and no amount of googling is yielding results. It's like a dialog window in a chat that holds views. I believe it's a standard UI component (possible in a later version of android).
That is a custom component specific to the search app.
The only API which is similar would be the QuickContact class. It provides a similar contextual popup for actions related to a contact (e.g., call, SMS, email, etc.).
You can use third-party libraries such as GreenDroid for similar functionality.
GreenDroid popup example http://lh4.ggpht.com/_OHO4y8YcQbs/TQFQZTft6OI/AAAAAAAAMpY/hAloaii6kRA/s800/gd7.png
Its nothing but the Quick Action Dialog ..
Check this for the Quick Action Dialog Widget....
On my HTC (with sense, android 2.2) I can get it by adding it trough
longclick -> widget -> 'google search' -> choosing 'all'
Related
I'm trying to show some information about the currently casted media inside the cast menu like this. The example apps provided by Google are using the CastCompanionLibrary, which won't be available in my project.
There isn't any hint in the Development Guide, so I really hope that there is anybody out there who knows how to do this.
Thanks in advance!
You need to write your own MediaRouteDialogFactory which needs your MediaRouteControllerDialogFragment which needs your MediaRouteControllerDialog.
Then use it via [Cast Icon] or [action bar menu item].setDialogFactory(yourMediaRouteDialogFactory).
Best to take a look at the Video Sample App.
Is the question about how to get info, or you are also asking about how to show a custom dialog when a cast icon is clicked on *while casting)? As for information, the image you referred to currently shows (a) some metadata about the media that is playing there (icon, title, ..) and (b) the playback status (paused/playing). These info are available from RemoteMediaPlayer.getMediaInfo() and getMediaStatus(). You should also register the dialog to listen to updates to media status and metadata so when the dialog is open, it can reflect the changes.
CCL is just a wrapper around the SDK apis so you can look at its code to see how it is using the SDK apis to accomplish these tasks.
i would like to ask a question with regards to AlertDialogs which i would like to use in GoogleMaps V2. I read about the custom InfoWindow documentation from the android developers and noticed that they advised not to put any interaction widgets (Buttons, Textbox etc etc) onto an OnClick function. Now, i would like to know if i could use a default alert dialog and put it into an OnClick function for the custom InfoWindow. Is it possible?
Yes that should work fine. The reason why you should not (and cannot, really) put interactive elements in an InfoWindow is because the InfoWinow is statically rendered when shown, making any interactive elements you place in it effectively useless.
I would like to reproduce the effect of appearance and disappearance of the action bar that carries the Google Application Now.
Exist there a library (GitHub project) to achieve this effect?
1) Initially, the action bar appears normally.
2) Then, as soon as you scroll down the listView action bar disappears.
3) And then, as soon as you scroll up the action bar appears again.
It's called Quick Return. See this blog post for details on the pattern. There is also a link to an implementation by Google developers.
Maybe this link can be usefull: it shows how to change ActionBar color while you scroll on layout. You want to achieve the opposite one, so you have to change a little the code. Personally i didn't try this code, but the blogger is a very good developer!
I would like to be able to minimize,resize or even close views and then when i feel like it restore them them back in the perspective from say a menu.
A concrete example:
I have views V1,V2,V3,V4,V5,V6,V7 and perspectives P1,P2,P3.
If i switch to perspective P1, views V1 and V2 show up but if i want i can also open V4, the rest of the views being unavailable.
If i switch to perspective P2, views V3 and V5 show up but if i want i can also open V4 and V6, the rest of the views being unavailable.
If i switch to perspective P3, views V1 and V3 show up but if i want i can also open V4,V6 and V7, the rest of the views being unavailable.
So depending on which perspective is active i can only access a certain group of views
Any suggestions on how i could and should do this?
Thank you guys
LE: BTW i want to do this programatically so that i may implement these rules in an app
Just create custom perspectives: http://www.newyyz.com/ntgsite/tag/custom-perspective/
Then you can have as many perspectives as you want, tailored with the views you want in them.
You should not try to forbid the creation of other views in those perspectives. Exactly that is what makes Eclipse a good customizable tool for every user. You surely don't know what views I as a user really need, you can only guess and create some good default perspectives.
In addition to what #Bananeweizen mentioned, you can create fixed perspectives. They prevent the user from opening other views while in that perspective. It's just by default, you have to choose between allowing the user to open any view or providing them with a fixed set of views.
There's no preViewOpen event that you can veto. You could add a part listener and when a part opens that you don't want, schedule a UIJob to hide that part ... but the user will see flicker in that case.
I come from Windows .Net forms development.
This is a pretty basic/fundamental question.
I'm attempting to build an Android app that will have multiple screens/forms (like most do)
My question is how do you achieve this in Android?
For example, a listview loads with menu items. When the user clicks a menu item, how is the new layout/form loaded?
Do you simply set visibility of your UI controls based on user actions? Or is there a built in mechanism to control the loading of "forms"?
I hope this makes sense. I have some java background and have actually done a small amount of Android development. (But have yet to do an UI type things)
Edit: A better way to phrase this might be: What is the Android equivalent of forms?
Thanks
Kevin
Just an addition to what Hesham Saeed has said, use
setContentView(R.layout.layoutId);
inside MyOtherActivity.java. This will load layoutId.xml layout file.
These forms are called Activities, and each activity binded with a layout/view.
You have to use intents,
Intent newActivity = new Intent(getApplicationContext(),MyOtherActivity.class);
startActivity(newActivity);