Hide elements in Spinner

by arnouf » Tue, 14 Apr 2009 15:51:09 GMT


Sponsored Links
 Hi all,

How can I hide some elements present in my spinner, when spinner is
already displated ?

Regards
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Porting Andriod on the Omap3 EVM

Hi,

I am trying to port android on the Omap3 EVM, but somehow I am facing
problem with kernel build.
For a reference, here I am listed down the steps:

1. Check out the Andriod kernel source code
$mkdir android_2.6.30
$cd android_2.6.30
$git clone git://android.git.kernel.org/kernel/common.git
$git checkout v2.6.30

2. Check out the Omap3 source code
$mkdir linux_2.6.30
$cd linux_2.6.30
$git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
$git checkout v2.6.30

3. Take the diff
$diff rN linux_2.6.30 android_2.6.30 > android_patch

4. Apply the anriod patch to omap kernel
$cd linux_2.6.30
$patch 1 <../android_patch

5. Build the kernel

## set the path env
$export PATH=$PATH:/opt/omap3evm/toolchain/arm-2007q3/bin/

## Set to default config
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- V=1
omap3_evm_defconfig
(**with this step .config file is created. I found some differences,
when I compared this file with omap3_evm_defconfig. This is very
strange, I couldn understand)

## build the kernel
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- V=1 uImage

[I have used default config file map3_evm_defconfigfrom omap git
(mentioned in step2)]

With the above steps, I got following errors while compiling the omap
kernel:

-------------------------------------------------------------------
arm-none-linux-gnueabi-ld -EL  -p --no-undefined -X --build-id -
o .tmp_vmlinux1 -T arch/arm/kernel/vmlinux.lds arch/arm/kernel/head.o
arch/arm/kernel/init_task.o  init/built-in.o --start-group  usr/built-
in.o  arch/arm/kernel/built-in.o  arch/arm/mm/built-in.o  arch/arm/
common/built-in.o  arch/arm/mach-omap2/built-in.o  arch/arm/plat-omap/
built-in.o  arch/arm/nwfpe/built-in.o  arch/arm/vfp/built-in.o
kernel/
built-in.o  mm/built-in.o  fs/built-in.o  ipc/built-in.o  security/
built-in.o  crypto/built-in.o  block/built-in.o  arch/arm/lib/lib.a
lib/lib.a  arch/arm/lib/built-in.o  lib/built-in.o  drivers/built-
in.o  sound/built-in.o  firmware/built-in.o  net/built-in.o --end-
group
arm-none-linux-gnueabi-ld: no machine record defined
arm-none-linux-gnueabi-ld: no machine record defined
make: *** [.tmp_vmlinux1] Error 1
----------------------------------------------------------------------

Can anyone suggest something on this?
Am I doing anything wrong here?


Thanks,
Prashant M

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Controlling the ProgressBar

Hello,
I have created a MediaPlayer and will play a sound file. There is also
a ProgressBar which I've configured to be a Horizontal Progress Bar.
The problem I'm having is getting the progress bar to update as the
song plays, i.e. when the song is half way played I want the progress
bar to be half way filled.
I can see that the trick is to use some sort of sleeping thread that
wakes up and then performs the ProgressBar.setProgress
(MediaPlayer.getCurrentPosition()) code but I cannot factor in the
threading code.
Would someone please take a look at a simple version of my code that
uses a button to manually update the progress bar and please help to
set me on the right course. Threads have never been my strong suit :(
Thanks in advance guys.

public class musicPlayer extends Activity {

        private Button buttonPlay;
        private MediaPlayer mp = new MediaPlayer();
        private ProgressBar progressMusic;

        /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        initialiseSong();

        //Create Play Button
        buttonPlay = (Button) findViewById(R.id.buttonPlay);
        buttonPlay.setOnClickListener(new OnClickListener(){
                public void onClick(View v){
                        playSong();
                }
        });

        progressMusic = (ProgressBar) findViewById
(R.id.progressMusic);
        progressMusic.setProgress(0);
        progressMusic.setMax(mp.getDuration());

        final Button buttonIndex = (Button) findViewById
(R.id.buttonIndex);
        buttonIndex.setOnClickListener(new OnClickListener(){
                public void onClick(View v){
                        progressMusic.setProgress(mp.getCurrentPosition());
                }
        });
    }

    //Creates the player with a default song selected.
    private void initialiseSong(){
        mp = MediaPlayer.create(this, R.raw.cake);
    }
    private void playSong(){
                if(mp.isPlaying()){
                        mp.pause();
                        buttonPlay.setText("Resume");
                }else{
                        mp.start();
                        buttonPlay.setText("Pause");
                }
    }
}

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

3. AutoCompleteTextView in an AppWidget?

4. how to relaunch the activity..

5. how to cancel an onItemSelected upon startup

6. Create Android background Service

7. Overlay events not go to MapView