Autoscroll to focusable fields?

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

Autoscroll to focusable fields?

Postby georgij » Mon Jun 01, 2009 7:06 pm

Hello, I have the problem that Android seems to have a build in scroll behavior which I can't control. I have a LinearLayout inside a ScrollView. Inside the Linear Layout I have many fields at the beginning which are not designed to have focus by default (a lot of TextViews).

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <ScrollView>
  3.  
  4.  <LinearLayout>
  5.  
  6.    <TextView>
  7.  
  8.     ....
  9.  
  10.    <TextView>
  11.  
  12.    <SomeInputView>
  13.  
  14.     ....
  15.  
  16.  </LinearLayout>
  17.  
  18. </ScrollView>
  19.  
  20.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


If the activity gets stated the Screen autoscrolls to the Views which are designed for user interactions (but seems not to focus them directly).

It seems not to lead to any control to set some of the first fields to be focusable or to request Focus for a field explicitly.

Is there a clean way existing?
G1, what else.
georgij
Junior Developer
Junior Developer
 
Posts: 13
Joined: Wed Jan 14, 2009 12:22 am
Location: Germany

Top

Postby georgij » Wed Jun 03, 2009 6:40 pm

I found out that the problem is caused by the GridView. (it seems to be a very unpredictable component) Even android:focusable="false" and android:focusableInTouchMode="false" are useless. Can GridView be prevented from requesting focus?
G1, what else.
georgij
Junior Developer
Junior Developer
 
Posts: 13
Joined: Wed Jan 14, 2009 12:22 am
Location: Germany

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 11 guests