Gallery missing attribute / method

by android_dev » Tue, 26 Aug 2008 01:40:23 GMT

Sponsored Links

What is the equivalent for these in SDK 0.9?

android:drawSelectorOnTop or setDrawSelectorOnTop(boolean)

android:spinnerSelector or setSelectorSkin(Drawable)


Other Threads

1. Confused about 9-patch files

Can someone please explain or provide examples (links) of some valid 9-
patch files?

As an example, there's a 9-patch located at:

[the same idea, as abad ascii representation]

0 = transparent, 1 = black, 2 = red


So there are 3 single-red-pixel columns, with stretchable areas
defined between them. It seems like this should resize to any aspect
ratio and there will still be 3 single-pixel red columns. My thinking
is that the solid black border on the left means "scale uniformly in
the y-direction" and that a pixel in the top row above the transparent
columns means "scale the transparent area, but leave the red columns
with width=1 pixel".

Is that the correct interpretation of black/transparent pixels?

Using the draw9patch tool, it doesn't scale if I make the left-border
completely black, but if I remove any one pixel, then it scales - why
is that?

When working in Eclipse, after refreshing the /drawables folder,
sometimes my 9-patch doesn't show up in the file, presumably
because it is somehow invalid. Yet, I can still refer to it and use it
in the Layout Editor. Am I correct to assume there's something wrong
with the 9-patch? Or perhaps there's something wrong with my (default
eclipse plugin) build process?

Thank you for any suggestions.


2. Hoping to change widget attributes by selecting a menu item


I am writing a program that involves a menu. Once you press the menu
and then select "Left",  it's supposed to change the attributes of
myButton12, an ImageButton.

However, I am getting a "myButton12 cannot be resolved" error message.
Please help me figure out what is wrong with this code.


The code:

package com.innodesign.testingbuttons;

import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AbsoluteLayout;
import android.widget.ImageButton;
import android.widget.Button;
import android.widget.EditText;
import android.content.Intent;

public class TestingButtons extends Activity {
       protected void onCreate(Bundle icicle) {

               final ImageButton myButton12 = (ImageButton)
               myButton12.setOnClickListener(new View.OnClickListener
               public void onClick(View v) {
               // Perform action on click

   public boolean onCreateOptionsMenu(Menu menu){

               menu.add(0, 1, 0, "Left");
               menu.add(0, 2, 0, "Right");
   return true;

       public boolean onOptionsItemSelected(MenuItem item){
               case 1:
               return true;
               case 2:
               return true;
       return true;

       public void shiftLeft(){
AbsoluteLayout.LayoutParams(10, 10,
10, 10));



3. How to update View object on main thread by background thread

4. Activity lifecycle, saving to a database, and remembering row IDs

5. How to Build kernel with android build system?

6. Zygote process died due to SIGSEGV

7. Issue in openintents simulator, after running directly going to "Connection settings" page instead of my desired page