Allow user to copy an image - android

I'm writing an app that generates an image, which I'd like to allow the user to copy so they can share it with other people.
Unfortunately, there's no copy/cut/share menu appearing when I do a long click on the image. I thought the OS would naturally do this, as it comes up in many different apps. Am I supposed to write some code before it will do this, or is there something in the layout that needs to be changed?
I've tried to google this, but the search results are taken up by various clipboard manager apps.

The OS doesn't naturally do that. You need to implement a OnLongClickListener on the ImageView, and implement a floating context menu.
But if you want the user to be able to share things, I would suggest the ShareActionProvider instead.

Related

Tasker : create a bubbled floating windows?

What i wanted to do, and didn't find any suitable solution, is :
create a scene in tasker (no problem on doing it :) )
display this scene on overlayed mode on other app (ex: waze,). Overlay is mandatory (as i know but i am maybe wrong) to let's the underlayed application work and refresh screen normally
allow interaction with button on the scene, just like we can do it if i choose the dialog mode for my scene. The problem with dialog mode is that the underlayed apps screen does not refresh.
In fact what i wanted to to is to display some button when i am running waze, to allow me to sens ETA Sms to my wife, or skip to the next track on my musics apps, or close waze quickly.....
As a resume i want to do what is
create floating windows like offered by apps like Overlays
but only using tasker
Best regards
Best
Please share some images of your requirements so that we can help you better but anyways I found a solution maybe it'll help you with some little customization.
According to my understanding, you need something like this:
You can download the whole project and customize it according to your requirements from Here

creating android text-based game

I am thinking about creating a text-based game (similar to gamebooks) for android device. In this moment only theoretically. Do you have some advice please, which way to go?
You probably know how gamebooks works, but the gamebook I want, will be very easy, should work like this:
User has shown some image, text and 3 options (questions), he decides which option to click, then a new page is showing (according to the clicked option) with another image, text and another 3 options. Then again, the user clicks one option, another page opens, etc.
My question is not how to do it programmatically, but how to start with this in Android Studio, what system to use for such game on android or which way to go.
Because I think it has no sense to create intents after each click, as there might be hundreds of clickable options.
I have already created such game on my website with php/html/js, but I want to create it also offline for android.
Intents implies one activity per page - unmaintainable.
You should work with a database and load based on user interaction. So you'll need to learn about Databases and Asynchronicity (working in the background while updating the UI so the user knows)

how to allow multiple selection of items in list view and show options like in whatsapp

If you use the whatsapp, you notice that you can do a long click on any message to select it. Then to select more messages, a normal click would suffice. Also at the top of the app, certain options become visible like copy, paste, share etc. On touching the back key, the selections are no longer highlighted.
It is very similar to the behaviour of selecting text in any android app, which happens automatically and does not require any kind of coding. Researching on this, I have been led to believe i need to use some combination of CheckedTextViews, selectors, onItemClickListeners etc. to achieve this behaviour.
So before i do attempt to implement this, I would like to ask if this kind of functionality is already available in the android framework?
Researching on this, I have been led to believe i need to use some combination of CheckedTextViews, selectors, onItemClickListeners etc. to achieve this behaviour.
That depends upon your implementation.
I would like to ask if this kind of functionality is already available in the android framework?
Well, that depends upon your precise definition of "this kind of functionality".
Generally speaking, what you are seeing is a contextual action bar (a.k.a., action mode). Here are a series of apps demonstrating the use of a contextual action bar, including one that supports using a long-press on a row to initiate the action mode.

Android - What is that popup called when you click a contact's icon?

On stock android, what is that thing called when you click a contact's picture and it brings up a list of quick links? this is also what you see when you long hold a icon in ADW Launcher.
More importantly though, i would like to know which png files in the folder frameworks/base/core/res/res/drawable-hdpi (from cm7 source, aka framework-res.apk) relate to that android view? (That is assuming they are in that folder, if not let me know).
I want to edit these but i cant for the life of me figure out which files relate to it. I have been searching around for a while and cant find anything on it.
This is known as Quick Contact Badge
See Here:
Android Quick Actions UI Pattern

Tutorials for simple Android search & what's necessary

I have a ListView, as well as a refreshListFromDB(String searchKeywords) method which updates the adapter.
I'd like to implement search, where pressing the search key on my device will pop up the standard search box (and on-screen keyboard if required), and pass the result (onKeyDown) to refreshListFromDB() - or is this considered bad UI design?
Search is a complex beast, so can anyone recommend any bare-bones examples? I don't want to use global QSB, as it's not relavent for my type of app. Do I really need to get into Intents, searchable XML, new activities, content providers etc?
I'd like to implement search, where
pressing the search key on my device
will pop up the standard search box
(and on-screen keyboard if required),
and pass the result (onKeyDown) to
refreshListFromDB() - or is this
considered bad UI design?
I don't know about "bad UI design", but the standard search box doesn't do what you say you want it to do.
Search is a complex beast, so can
anyone recommend any bare-bones
examples?
I used to have a bare-bones example, but that was before QSB, which added another pile of bones on top of the bones I had. You can still look at the larger pile of bones here, and the pieces you seek are described in (ahem) a book.
Do I really need to get into Intents,
searchable XML, new activities,
content providers etc?
To use the "standard search box", you need the first two in your list, and possibly the third depending on how you want to do it. I have both reused existing activities and created new ones in my search experiments. You will not need a content provider, though.
You could also have a look at the Searchable Dictionary Sample Application that comes with the SDK, although I think this does integrate with the Quick Search Box.

Categories

Resources