Specific drawable not working?????

by mikedrmfs » Fri, 20 May 2011 09:30:40 GMT


Sponsored Links
 In a very simple menu the drawable @android:drawable/ic_media_stop
doesn''t work and @android:drawable/ic_media_pause does.

I get problem
[2011-05-19 14:04:52 - Twitter Update] W/ResourceType( 7852): Bad XML
block: header size 151 or total size 0 is larger than data size 0
[2011-05-19 14:04:52 - Twitter Update] M:\Development\Eclipse_Java
\eclipse\Workapace\Twitter Update\res\menu\menu.xml:6: error: Error:
No resource found that matches the given name (at 'icon' with value
'@android:drawable/ic_media_stop').

Both of them are in
M:\Program Files\Android\android-sdk\platforms\android-8\data\res
\drawable-mdpi

-- 



Re: Specific drawable not working?????

by Marcin Orlowski » Fri, 20 May 2011 16:46:37 GMT


 



You should copy drawables to your app's res folder.

Regards,
Marcin Orlowski

*Tray Agenda < http://bit.ly/trayagenda> ;* - keep you daily schedule handy...
*Date In Tray* < http://bit.ly/dateintraypro> ; - current date at glance...
WebnetMobile on *Facebook < http://webnetmobile.com/fb/> ;* and
*Twitter< http://webnetmobile.com/twitter/> ;
*

-- 


Sponsored Links


Other Threads

1. Intent from listview open an image that not correspond with the thumbnail

Hello

I have an application with an activity in which there is a listview
that shows imageviews with textviews in each row. The fact is that
when I click on any of the images of listview always opens the last
image that has entered the listview (above or below). Does anyone know
how to make it open for the thumbnail image on which I am pressing?
The section of code that manages the listview getView is:

//************************************************
*****************************
        @Override
                public View getView(int position, View convertView, ViewGroup
parent) {
                        View v;
                        final ViewHolder holder;

                        //try{

                        //Asigna al listview el layout single_item
                                v = convertView;
                                try{
                                if (v == null) {
                                        LayoutInflater vi = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                                        v = 
vi.inflate(R.layout.single_item_recuperados, null);

                                        holder = new ViewHolder();
                                holder.i = (ImageView) 
v.findViewById(R.id.iconolista);
                                holder.Nombre = (TextView)
v.findViewById(R.id.NombreArchivo);
                                holder.Tamano = (TextView)
v.findViewById(R.id.TamanoArchivo);
                                holder.RutaThumbnail = (TextView)
v.findViewById(R.id.RutaThumbnail);
                                v.setTag(holder);
                                }
                                else
                                {
                                        holder = (ViewHolder) v.getTag();

                                }

                                 try{
                                         datos = items.get(position);
                                 }catch (NullPointerException npe)
{ System.out.println("Items.get(position) esta dando NULL"); }
......
......
......

/ / at the end of getView I have ....


holder.i.setOnClickListener(new OnClickListener() {
                        @Override
                                public void onClick(View v) {


                                        Intent intent = new Intent();
                                       
intent.setAction(android.content.Intent.ACTION_VIEW);
                                       File file = new File(ruta);
                                       
intent.setDataAndType(Uri.fromFile(file), "image/*");
                                       startActivity(intent);
                         }
                        });



Any ideas?

Thanks.

-- 

2. ListView NullPointerException

I am getting nullpointerexception from this method.i have checked
myarray adapter.its'not null,please help mo :S

public View getView(int position, View convertView, ViewGroup parent)
{
                        ViewHolder holder;

                        if (convertView == null) {
                                convertView = 
tablo_ekleyici.inflate(R.layout.sefer_tablo, null);
                                holder = new ViewHolder();
                                holder.sefer_saati = (TextView)
convertView.findViewById(R.id.sefer_saati);
                                holder.sefer_guzergahi = (TextView)
convertView.findViewById(R.id.sefer_guzergahi);
                                holder.otobus_ozellik = (TextView)
convertView.findViewById(R.id.otobus_ozellik);
                                holder.bilet_fiyat= (TextView)
convertView.findViewById(R.id.bilet_fiyat);

                                convertView.setTag(holder);
                        } else {
                                holder = (ViewHolder) convertView.getTag();
                        }
                        String sefer[];
                        sefer=SeferBilgileri.get(position).split("!");


                        holder.sefer_saati.setText(sefer[0]);
                        holder.sefer_guzergahi.setText(sefer[1]);
                        holder.otobus_ozellik.setText(sefer[2]);
                        holder.bilet_fiyat.setText(sefer[3]);
                        return convertView;
                }



-- 

3. frame rate

4. [WTShare] Grup LinkedIn: Android Developer Indonesia

5. Custom Data Schema

6. Drawing in Android View on 2.1 (not 3.0)

7. monkeyrunner + ADB over TCP