protected member variable mScrollX not accessible to subclasses of ViewGroup

by Marco Nelissen » Fri, 02 Oct 2009 22:17:54 GMT


Sponsored Links
 


Does it actually fail to build, or are you just talking about the
syntax highlighting?
mScrollX is a protected member of View, so should be accessible to any subclass.

--~--~---------~--~----~------------~-------~--~----~



protected member variable mScrollX not accessible to subclasses of ViewGroup

by Romain Guy » Fri, 02 Oct 2009 23:36:36 GMT


 mScrollX is not part of the public API. Use getScrollX() and
scrollBy()/scrollTo() to change it.







-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. AbstractAccountAuthenticator.getAccountRemovalAllowed query

hi,

I'm trying to create a sync account which should not be deleted by user ( On
selecting RemoveAccounts from Accounts settngs).

For that, I overriden getAccountRemovalAllowed() function. From the java
docs (@
http://developer.android.com/reference/android/accounts/AbstractAccountAuthenticator.html)
it says we can return a bundle with any of the below keys.

   - 
KEY_INTENT<../../../reference/android/accounts/AccountManager.html#KEY_INTENT>,
   or
   - 
KEY_BOOLEAN_RESULT<../../../reference/android/accounts/AccountManager.html#KEY_BOOLEAN_RESULT>,
   true if the removal of the account is allowed, false otherwise
   - 
KEY_ERROR_CODE<../../../reference/android/accounts/AccountManager.html#KEY_ERROR_CODE>and
   
KEY_ERROR_MESSAGE<../../../reference/android/accounts/AccountManager.html#KEY_ERROR_MESSAGE>to
indicate an error

The problem I'm seeing is, it always shows the same Dialog on selecting
"Remove account" even if I return any key bundle ( KEY_INTENT,
BOOLEAN,ERROR_CODE).

I wanted to shown my own custom activity with the reason for not deleting.
I'm creating the Intent of my custom activity and returning it in Bundle
from getAccountRemovalAllowed() api. Instead launching my custom activity,
Its showing a Dialog with text "This account is required by some
applications, You can only........"

Please let me know, If I missed something?. Thanks.

Regards,
Sukumar.

-- 

2. Put multiple lines of images

Hi all
    I'm trying to put an image multiple times and on multiple lines.
What i want to do is similar to a matrix, where each cell is an
istance of my image.
Here's my code:

 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mLinearLayout = new LinearLayout(this);
        for (int i = 0; i < 10; i++) {
                ImageView image = new ImageView(this);
                image.setImageResource(R.drawable.icon);

                image.setAdjustViewBounds(true);
                image.setLayoutParams(new
Gallery.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
                mLinearLayout.addView(image);
        }
        setContentView(mLinearLayout);
    }

But my last image shrinks and I got them only on one line.
Am I missing something?

-- 

3. NEW TOURIEST SPOTS IN KERELAhi,just see that

4. How could I make such a UI? customized UI issue

5. Pamer dan share app: All of my Android apps!

6. General lag issues with real-time games

7. Please share the info about the problem "app is not visible on Android Market"