How can I customize the position of a QuickAction? - java

I have a clickable FrameLayout and I want to display a few quick actions on top of it after a long press. I can create a QuickAction to pop out of it like the old Twitter app, but I'm not sure how to display it like the current one.

It's been a while but like I promised in the comment section:
Here's the Twitter like feature you were asking for which works without a list view.
You will find all information in my answer to Twitter for Android like swipe-to-side quick menu

Related

How to place comments on a full screen image?

I'm working on a native android application in java with Android Studio and I want to add comments on full screen images like this. This based upon a feature of "Figma" where you can place comments on prototypes.
I have already made a xml file that normally has an Imageview in full screen. So I probably need to draw a circle on the exact coordinates of the view where I click. So how can I achieve this in java code?
Figma example 1
Figma example 2
use draggable view and when user clicks it display dialog where they can enter a comment,
then save the position of the view and the comment to SQLite or wherever you want so the user can retrieve it again whenever they need it

How to make side menu using browse fragment like netflix in android tv?

Attached screenshot of netflix app with left side menu I am able to develop a side menu with customized icon and header in it. I want, when the focus comes on header fragment it should expand on top of row fragment, that is not collapsing the row fragment, the same as Netflix and hotstar are doing. How can I achieve it?
unfortunately, the HeaderSupportFragment used in the BrowseSupportFragment is not configurable enough to achieve this kind of design. Leanback is great to build quickly and easily media browser app but when it comes to "complex" design, it's easier to use custom component.
The major difference also here, is that the left menu of the BrowseSupportFragment show each rows header name displayed in the screen (that's why it's called HeaderSupportFragment). Here you want to show different entries like search, home, settings, etc.
To make this kind of view, I would suggest creating your own custom view and use a basic Fragment. I followed this tutorial which can be useful to handle menu open/close animation (I mixed it with a ConstraintLayout to simplify the animation and I made the menu overlap the rest of the screen instead of moving everything.)
See the tutorial: https://medium.com/building-for-android-tv/building-for-android-tv-episode-3-381e041dfec7

Java Android AlertDialogs Show on infowindow OnClick for google maps v2

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.

Android ICS Spinner with actionbarsherlock

Hi Guys
I want to use ICS spinner in my android application so i can move between views (min API 10), I'm using ABS.
So how can i add and use spinner( but please A detailed explanation ) in my case, and how to add additional button in the ABS?
Thax for your time :)
ICS Spinner : like the gamil application to choose between your account
Use setNavigationMode() and NAVIGATION_MODE_LIST with ActionBar, as is illustrated in this sample application and as is covered in the documentation.
additional button like the share button in ICS action bar but to do another job like creating something add somthing
You do this the same way that you add items to the overflow menu (or the old options menu), except that you include android:showAsAction in your menu XML (e.g., android:showAsAction="always"), as is illustrated in this sample application and as is covered in the documentation.

View different images depending on what item in my list view I click

I'm fairly new to Android programming and I've got this project I need to finish and I'm currently stuck.
I've got a standard listview in a Menu class with an array containing around 20 different elements. So what I want to do is load images in an imageview depending on which item in the listview I click, and since I'm a beginner the only idea I had was to make a new activity for each imageview which seems like a pretty bad way to do it since I'd need about 20-30 new activities..
To sum things up what I want is:
Code for making ONE activity that will display a different image depending on which item in the listview I click, probably pretty basic coding I want as simple solution as possible.
If possible I'm also looking for a solution that includes an SQLite database that stores the URL of an image and then display it in a single activity, also depending on which item I press in my current listview.
(I hope you understand my needs, and if you need I can also post my current code for the Menu class if it helps you help me) Or you can just show me a different way to make this work, I appreciate every answer! Thanks in advance!
NOTE
And please keep in mind, I'm a noob at Java and Android so keep it rather simple or at least explain what you do.
When you click on a list item, display the image in another view in the same layout, unless you want the image to take up the entire screen real estate. If you want it in the entire screen, go to a new Activity by sending the activity an Intent.
Activities are the "controller" of your application. They interact with the visible UI and the input from the user. You don't need a separate activity for each image, just an activity that's associated with a "place" in the UI (an ImageView) where you'll display the image.
I'd start by adding the images as resources under res/drawable before going on to databases.
You are going to have to do most of this yourself. There really isn't any substitute for taking the time to learn Java and Android. There are several tutorials and Android University classes under the Resources tab in the Developers Guide; I suggest you do all of them.

Categories