HTC EVO 4G :: How To Achieve Right Click Functionality?
Oct 31, 2010Is there a way to achieve 'right click' functionality. Basically, I want to save some pictures from few web pages by using right click->save image as.
View 1 RepliesIs there a way to achieve 'right click' functionality. Basically, I want to save some pictures from few web pages by using right click->save image as.
View 1 Replieswhen I click on one item in the ListView that item's background changes to light gray, but when I continue to scroll through the list every 4th item has the background changed to light gray even though those other items have not been clicked. How do I make only the item I clicked be effected by the click?
ListView lv = (ListView) findViewById(R.id.resultsList);
lv.setAdapter(new ArrayAdapter(this, R.layout.resultitem, (String[])labelList.toArray(new String[labelList.size()])));
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View view, int position, long id) {
TextView tv = (TextView)view.findViewById(R.id.result);
tv.setBackgroundColor(Color.LTGRAY);
tv.setTextColor(Color.BLACK);
I have a ListView in my Activity. I am trying to catch both a click and a long click (which should bring up a context menu).
ListView lv = (ListView) findViewById(R.id.MyListView); ... lv.setOnItemClickListener(this); lv.setOnCreateContextMenuListener(this); ...
I notice that if I have both the click and long click listeners up, I won't ever get the long click listener (i.e. the context menu). If I remove the setOnItemClickListener() call, i get a call into
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at
I have just started my career as an android programmer, and am currently relying heavily on the sample code and api examples. I have been working with this api example, to produce an expandable list of items (note this example does not use the ExpadableListView).In playing with the example, I tried to add another widget that would become visible and be gone at the same time as the text (mDialogue in the sample code). This works well with another TextView, but as soon as I tried to add a button widget, it stopped working. The list would expand on first click, showing my hidden TextView and Button, but it will not disappear on further clicks. The button is however, clickable, and I was able to set up an onClick listener to change the button text back and forth.I'm starting to wonder, is it just not possible to have a clickable item inside a clickable list item? Or is there some kind of work around? Would it solve my problem if I used ExpandableListView?
View 1 Replies View RelatedIs it possible to do polling in Android? For example, I want my application to monitor a directory continuously. If there is for example a new folder created in that directory I want to log it down. Is it possible to acheive this by polling? Or is there any other way to do this?
View 7 Replies View RelatedI have a webview and need to trigger a function when a user clicks on particular url. How can I achieve this?
View 5 Replies View RelatedSo I'm struggling a bit with what is probably a fairly basic concept.. Activity Lifecycle.I have read a bunch of thread on the topic, and I feel I understand well both the functionality, and rationale behind the lifecycle model implemented for Activities, but it raises a bit of a problem for me. My app (game) has a couple of distinct Activities for various sections:
1. The TitleActivity is a very small Activity that just launches a GLSurfaceView and renders a startup logo.I use this to detect the OpenGL capabilities of the device (eg so I know if it's using a software renderer)
2. The LaunchActivity is the main menu screen where the user can access options etc and start a game
3. The GameActivity will either launches a GLSurfaceView or a standard View depending on hardware capabilties.
The issue I am having is that I want to pre-load some "slow-to-load" resources, specifically audio, in the Title Activity so when the Launch Activity renders I can play some background music.I have the concept of a "media library" which I use throughout the game.Because of memory limitations in the SoundPool, I have limited this to only absolute real-time sounds and all others are played using mulitple instances of MediaPlayer.Hence my media library has a bunch of pre-loaded MediaPlayer instances which I access regularly during game play.. so it makes sense to have a centralized access point for all audio.All fine, however the problem is that when I launch one activity from another.. for example the TitleActivity starts the LaunchActivity (via a call to startActivity(Intent...)), the former goes through the onDestroy stage of its lifecycle.Now logically I had assumed that if I allocate a bunch of resources in the onCreate of an Activity, I should clean them up in the onDestroy, however in the case of my "media library" if I load up the audio files in the onCreate of my TitleActivity they will be torn down when the LaunchActivity is started because the TitleActivity will have its onDestroy() method called.
I'd like to populate a listview from 2 tables. Anyone know how I can achieve this? Currently what I have looks like but it only works with one adapter.
View 1 Replies View RelatedI am developing an application in which a user keeps on scrolling and each view displays a single text. The views are not suppose to end. How can i achieve that?
View 4 Replies View RelatedI want to make my android project Internationalization,but i don't know how to achieve it. I have searched on the internet,and just know i have to make values-xx file in
es.I want to know what should i do about the code.
I am trying to develop small application for reset Logging on Phone. Can some one throw some Lights on how to achieve logging in AndriodRunTimeInit whenever there is exception? I want to write into file whenever there is RunTime exception.
View 1 Replies View RelatedIs there any way to achieve perspective drawing of an image.. are there any APIs.. or is OpenGL the only solution..
View 2 Replies View RelatedThings go fine, and i am able to design a layout like this...
View 3 Replies View RelatedAfter doing a fair bit a tinkering and research experimenting for a month. I managed to find the best solution for people who don't want to use custom roms. Yet wanting a similar yet better mobile experience they had with 2.1 eclair. After a factory reset. Latest Voodoo Lagfix via Odin |or| ryanZA's OneClickLagFix your choice
1. root - z4root app from market.
2. ryanZA's OCLF app
- Alter minfree. Set to Aggressive
- Change Scheduler. Set to deadline
3. SGSTools.
- Upgrade stock apps.
+ Modded Contacts app showing all letters
+ Stock browser with useragent setting
+ Faster TouchWizLauncher(GTG) <--- TOUCHWIZ CAN't GET ANY SNAPPIER >
- GPS fix
Just like (2.1 with OLCF) Fast, snappy, loving it
I am drawing a pretty simple scene, with one large texture the about size of the screen (two triangles). I notice that the frame-rate is irregular: in most of cases, a frame finishes in 17 ms. However, in about 1 of 10 times, the frame finishes in 33ms.
My guess is probably some background services need to run. However, the Linux scheduler is biased towards my FG app, so the BG services are usually starved, until they can't take it anymore and they grab the CPU from my app ....
I am seeing stuttering in the animation. Is this due to the irregular frame rate? Should I delay each frame so that all frames are rendered with 33ms frame time? If so, what's the best technique of achieving this?
Is there an API that I can call to guarantee CPU resources for the render thread .... I really hope Android runs on some sort of real time kernel ...
On iPhone, Mobile Safari is WebKit based and supports hardware-accelerated -webkit-transform CSS properties. To be specific, I use the translate3d() transform.
What alternative is there for the Android browser? I need it to work on Android 1.5.
I would like to have a layout with 5 times 5 buttons. Each of them should have the same width and height (they should be square). And I want the whole matrix to use the screen width (or height, depending on rotation).
I currently do it "by hand" in the Java code:
CODE:...........
This can be improved by obtaining screen width first and then dividing by 5 to get rid of this literal 60. But I'm wondering how I can do this in the res/layout XML file? How can I specify for the height to be the same as the width? (I can set the width to match_parent.)
When i use toast to display some text on screen it displays little bit above the bottom(default position).
now i want to display it in the middle of screen or according to my choice can any one guide me how to achieve this?
When using a mediaplayer to play back an audio file, you can set looping to true - that's not the issue here.
If looping is set to true, there's still an audible gap between the file finishing and then starting again.
How could I achieve true gapless playback? I've attempted using two instances of the same file, overriding oncomplete and onseek.. can't seem to improve the gap though.
Strangely I find no support for Midi in Android.
The only thing that comes close is the Jetplayer, but this only takes a existing .jet file.
I want to dynamically generate a midi file with some intervals and play it.
I even thought about just manually creating a .jet file with a tone and then transposing it with the jet player, but it limits the transposing to -12, +12. Which is not so good for me.
There also is a ToneGenerator on Android, but it's limited to predefined tones with no way to transpose.
Does someone know how to achieve midi generation and playback on Android?
I am preparing to program an useful application, I would like to collect your ideas.
Any new ideas of apps that helpful in daily life, even achieve the society?
The following code executes a function that retrieves a file via ftp and then displays it in an imageview. Since I'm using the main thread the UI locks up, somebody tells me I can use asynctask to make this work but I can't figure it out :<
Is anybody familiar with this that could offer me some guidance? code...
How can I achieve the following layout in Android?
What I would like, is to have the 3 blue boxes top aligned in their view, and then I'd like to have the red box centered underneath the blue boxes, but so that when I animate the red box up, it slides underneath the blue box.
I have tried placing the blue and red boxes in different layouts, but as soon as I animate the red box up, if it goes outside the border of its layout, it disappears (I don't want the red box's layout to clip the red box, I want the red box to slide under the blue box so that the blue box occludes the red box.)
I have also managed to create this layout using a series of nested layouts, but because of the draw order, the red box always appears on top of the blue box. I attempted to use the bringToFront() method, but I found out that this only works on sibling views within the same layout. Unfortunately I can't get this type of layout while keeping all 4 views within the same layout. Any suggestions? (also, if anyone has better suggestions for the title of this question I'm all ears)
When I DL'd the GDE app, I accidentally set my stock droid "HOME" screen as the default screen when the popup box came up asking me to choose between stock Home and GDE. Now when I click on GDE and click the home button, it switches back to the stock Home screen. How to I switch the settings now to set the GDE app as the new home screen?
View 15 Replies View RelatedMy blackberry used to turn on if an alarm was set to go off and the phone was off. Is there a setting or app to make the EVO turn on when an alarm is set to go off? Or just turn on at a specific time. Appbrain produced nothing useful.
View 10 Replies View Relatedi am developing a game and i need to use android1.5 only.
i wrote sample application using 1.6 and kept drawable-hdpi,-ldpi ... and application is working fine in emulator of 1.6. i made apk and opened an emulator (android 1.5) from command prompt application is also working fine.
in 1.6 if i change emulator resolutions the application UI is resizing. but in 1.5 emulators not.
is that mean, the application developed in android 1.6 runs in 1.5 emulator but multi screen support is not achieved?
..."how to achieve multiple screen sizes in android 1.5". multiple screen support is available from 1.6.
My Android main application will consist in a main program, with a few pre-installed modules.Then I want to offer different modules later, best would be as separate files. Modules like: location, weather, agenda.How would you accomplish this?I want to keep in the database the modules that are installed/present. So I must put sometimes the modules into database, maybe by detecting if there are present at launch time. The main app will work based on these modules.How can I build these modules as separate files? They won't be an entry point in my application. So they must not be an application in the navigation menu.
View 1 Replies View RelatedI'm using KF v37 and like it, except that WiFi performance is quite poor. The Eris must be within 10' of the wireless router or it will "Connect" but is unstable.
View 5 Replies View RelatedI come from using a blackberry and am now using the samsun fascinate. I have my work email set up but one thing i haven't found the ability to do is to perform a search for my emails. On my blackberry I was able to search by subject, person's name and read/unread and i was looking to do the same thing but i have not found where i can do that or an app that will assist me with this.
View 2 Replies View RelatedI'm getting more and more requests about being able to use an App to SD feature that must be part of Android 2.2, but I really have no experience with it. I also don't know where to find any documentation regarding how to make my apps compatible with this feature. People have told me my apps cannot be moved to the SD card. My mind is also telling me that this is a really bad idea for paid apps that don't have license protection of any kind. Has anyone had any experience with this, know of any documentation, or have any tips regarding what would stop an app from being compatible with this feature?
View 3 Replies View Related