Is that possible to click on image to open the dialog box. because I want to open dialog box by clicking on image which has only name, there is no other property associated with that image.
To get this issue I tried with x,y co-ordinate method as well, but again the issue is when I changed the phones the screen size matters. so I did not able to use that too. other than this I did not get any other option to resolve the issue. I do not get much about this on web.
Does anybody know the solution, that will be helpful?
Kind Regards,
Vaibhav
I'm not really sure what you mean by 'has only name', but if there is no other way to locate the image view, you could use the index.
To find the index,
query "* ImageView" and see which one matches.
Then you can interact with it like so:
tap "ImageView index:0" #or whatever index
Note: If it was actually ID'd somehow (e.g. had a ContentDescription), you could do
tap "ImageView marked:'<whatever ID>'"
Related
This question is kind of difficult to put in words, but I want to know how to toggle between the dimens/strings id's vs their actual values. The IDE is IntelliJ. An image should make it a bit more clear what I'm asking:
Upper image is actual values, lower image is with full id displayed. If you click on the 60dp, it will then display the full id. I'm interested in how to then revert it back to the original 60dp. I've spent some time trying to find it online and but couldn't find anything. I know that I could always just do a "go to declaration" on the id and find the actual value in strings.xml, but it would be significantly faster to just read it on the spot. Any other useful IntelliJ/Android tips someone could think of would be welcome too. If you could help me I'd be very happy.
On Windows press Ctrl+> to both expand and collapse when the cursor is within the value/code you want to perform Folding on or just use Ctrl++ or Ctrl+-.
This is called code folding and can also be found under the contextual menu (when you right click on the code) then Folding (See image below)
I have used this forum when I didn't know how to do something, but now I have decided to begin participating in it.
I would like to know how could I do a dropdown text (maybe it has a specific name and that's why I don't find any results on the internet). I mean, I have some tags in the screen (About, Company, Contact, ...). Each of these tags has a down arrow on the right side, and when I click it, it has to display (and hide if it's clicked again).
Here are the links with the images of what I want to do.
http://i45.tinypic.com/4fzoso.png
http://i47.tinypic.com/2u5886q.png
Thank you in advance!
You should use an ExpandableListView component.
There is a tutorial for it here.
Finally I did it with ImageViews and TextViews using the property android:visibility. Now that it's a static version is working properly. I hope that it continues working well when taking the information from the DB
I have a EditBox, and on right side of this EditBox I wan't to put a Button representing "Get My Position".
User clicks on this button, and my application get his position and fills EditBox with it.
I found a Compass and added on a ImageButton, but I don't know if this really represent the idea.
Anyone knows a better button to represent "Get My Position"?
Thanks
Your Button looks ok, and will be recognized by most users. If you want to get the System-default (the picture of the Drawalbe may differ on roms from HTC, Samsung Motorola etc) you can get it with
getResources.getDrawable(android.R.drawable.ic_menu_location)
Always check for non-Null here. You can download the standart Android location Button here, (ic_menu_location), as a fallback, if the getDrawable() call fails
I used a 'globe' in my application. If the EditBox is blank until the user requests their location, why not use the put some default text inside it requesting the user to click the button?
I am looking to create an application that allows the user of the app the ability to create their own text box. It would be on top of an image file that I currently load. Basically they would zoom in to a place on the image, then drag with their fingers the position of the needed text box, then the box would be able to accept text...
I cannot find anywhere how I would accomplish this task ??? any suggestions or help would be much appreciated!!!
thank you!!
I am assuming based on
"then the box would be able to accept text..."
that you mean the user will be able to type things in to it.
If that is correct then an EditText is what you are looking for. By default this View is not set up to let the user
"drag with their fingers the position of the needed text box"
In order to make that work you'd have to write your own OnTouchListener for this view that recognizes the finger motions and changes the size of the EditText accordingly.
I am developing an Android App which gives users an option 'Browse Alphanumerically'. Using this option let users view the list of items starting with a particular letter or number. Problem is that I cannot decide how to implement screen for this, which can work properly on any screen size. Please suggest me the best solution.
Thanks.
What I got from your question is that you want to show all alphabets and numbers to the user so they can jump directly to a entries start with the selected alphabet or number. If this is so, then one solution to your problem is use the Button or ImageButton any make a key pad of all alphabet and numbers. Don't forget to make them flexible enough for different screen sizes. Cheers.
Use a list activity. There are lots of tutorials on Google's developer site. When you want to narrow the list, just assign the smaller list to the ListView. Just filter your master list, sort it, and assign it to your list adapter.
Hope this was helpful.