EditText Event

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

EditText Event

Postby Ripei » Sat Nov 07, 2009 4:46 pm

Hey Guys

If got a problem, which i cant solve by my own.
I am using a TabActivity, which implements a OnGestureListener. I coded that, when sb. drags the Tochscreen from left to right, it changes to the next right tab. (vice versa). I do this in the methode "onScroll()".

Now... i've put multiple EditText-Fields into my tabs. If i try to drag on them - to switch the tab - it doesn't work because then the EditText gets the focus and the Softkeyboard appears. What I want is to be able to drag also on edittext fields. Isn't there any way to capture this touchevent on the edit-text fields? Info: i just definded the edit-text-fields in the xml. I don't want to add for each of those a variable.

Thanks for your help :)

Ripei
Ripei
Freshman
Freshman
 
Posts: 3
Joined: Sat Nov 07, 2009 4:38 pm

Top

Postby I_Artist » Sat Nov 07, 2009 7:45 pm

Hi Ripei,

I quickly tried this on my Magic running cyano 4.2.2, and the functionality seemed to work correctly. 3 text views on the screen, tv 2 is focused, I swipe over tv3 and tv2 does not lose it's focus. Maybe you are pressing to long before you start swiping?

(sorry if that is not of any help, but I can't help you fix it if it is not broken on my phone :) )

Cheers!
The I_Artist

follow me on Twitter: @I_Artist
follow Android Development on Twitter: #androiddev

Show the world that you are an #androiddev, wear the badge http://www.twibbon.com/join/androiddev
User avatar
I_Artist
Developer
Developer
 
Posts: 33
Joined: Fri Oct 16, 2009 3:49 am
Location: St-Eustache, Quebec

Postby Ripei » Sun Nov 08, 2009 12:19 pm

hello... thank you for your help so far. :)

i createt a small project to show you the problematic.
if you drag from left to right or vice versa you get the Text "right" or "left" ... put if i drag on the editTextfield
nothing happens except that the textfield gets the focus.

check it out and you'll hopefully see what my problem is.
Attachments
EditTextTouchTest.zip
(27.09 KiB) Downloaded 39 times
Ripei
Freshman
Freshman
 
Posts: 3
Joined: Sat Nov 07, 2009 4:38 pm

Postby I_Artist » Sun Nov 08, 2009 5:33 pm

I tried to install your .apk, but I received an error (-12), I'm guessing it's because it is not signed...

I did notice that your layout code is very simple, maybe too simple? Do you need to set an attribute on the TextView maybe?
The I_Artist

follow me on Twitter: @I_Artist
follow Android Development on Twitter: #androiddev

Show the world that you are an #androiddev, wear the badge http://www.twibbon.com/join/androiddev
User avatar
I_Artist
Developer
Developer
 
Posts: 33
Joined: Fri Oct 16, 2009 3:49 am
Location: St-Eustache, Quebec

Postby Ripei » Sun Nov 08, 2009 6:15 pm

sry... never before signed a apk^^
hopes this works now.... and you'll see whats the problem (the layout doesn't matter).
Attachments
EditTextTouchTest.apk
(9.06 KiB) Downloaded 45 times
Ripei
Freshman
Freshman
 
Posts: 3
Joined: Sat Nov 07, 2009 4:38 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 9 guests