plz solved it

Put your problem here if it does not fit any of the other categories.

plz solved it

Postby palak1302 » Fri Feb 01, 2008 10:09 am

in xml i have

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2.  
  3.    android:orientation="vertical"
  4.  
  5.    android:layout_width="fill_parent"
  6.  
  7.    android:layout_height="fill_parent"
  8.  
  9.     >
  10.  
  11.  
  12.  
  13.     <dj.android.demo.Gallery id="@+id/gallery"
  14.  
  15.        android:layout_width="fill_parent"
  16.  
  17.        android:layout_height="wrap_content"
  18.  
  19.        android:gravity="bottom"
  20.  
  21. />
  22.  
  23. </RelativeLayout>
  24.  
  25.  
  26.  
  27.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


in Activity

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public class demo extends Activity {
  2.  
  3.   ..onCreate(Bundle icicle)
  4.  
  5. {
  6.  
  7. Gallery gallery=(Gallery) findViewById(R.id.gallery);
  8.  
  9.  gallery.setAdapter(new ImageAdapter(this));
  10.  
  11. }
  12.  
  13.  
  14.  
  15. }
  16.  
  17.   public class ImageAdapter extends BaseAdapter{........
  18.  
  19.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


my package name is dj.android.demo
There's an error when i run it : "android.view.viewinflate$InflateException:Binary XML file
plz solved it.......
palak1302
Junior Developer
Junior Developer
 
Posts: 23
Joined: Thu Jan 31, 2008 5:17 pm

Top

Postby kiran » Fri Feb 01, 2008 10:51 am

hi,

Try:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <Gallery id="@+id/gallery"
  2.  
  3.        android:layout_width="fill_parent"
  4.  
  5.        android:layout_height="wrap_content"
  6.  
  7.        android:gravity="bottom"
  8.  
  9. />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


or if u want to load a custom view defined by a java file named 'Gallery' in ur package try:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <view class="dj.android.demo.Gallery"
  2.  
  3.                 id="@+id/map"
  4.  
  5.                 android:layout_width="fill_parent"
  6.  
  7.                 android:layout_height="fill_parent"/>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
:) smile it is the key that fits the lock of everybody's heart
User avatar
kiran
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Thu Nov 22, 2007 11:36 am
Location: India

Postby palak1302 » Fri Feb 01, 2008 1:03 pm

thanks kiran.............but now show error "ClassCast Exception" :cry:
palak1302
Junior Developer
Junior Developer
 
Posts: 23
Joined: Thu Jan 31, 2008 5:17 pm

Postby plusminus » Fri Feb 01, 2008 4:31 pm

Hello palak,

try the following... because the SDK-Gallery is not the same as yours :!: :
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. dj.android.demo.Gallery gallery=(dj.android.demo.Gallery) findViewById(R.id.gallery);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby palak1302 » Fri Feb 01, 2008 6:04 pm

but i m used SDK-Gallery....plz see my code
palak1302
Junior Developer
Junior Developer
 
Posts: 23
Joined: Thu Jan 31, 2008 5:17 pm

Postby plusminus » Fri Feb 01, 2008 7:55 pm

Hello palak1302,

you are not using the SDKs Gallery :!:
You are using your own Gallery, because you had been trying the following :!: :
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.     <dj.android.demo.Gallery id="@+id/gallery"
  2.  
  3.        android:layout_width="fill_parent"
  4.  
  5.        android:layout_height="wrap_content"
  6.  
  7.        android:gravity="bottom"
  8.  
  9. />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 14 guests