Error Inflating Class Android.widget.viewflipper
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up android.view.InflateException: Binary XML file line #13: Error inflating class ViewPager up vote 1 down vote favorite 1 I am new to Android (day 1) and i was taught to display images (ImageView) using viewFlipper today. ViewFlipper works fine for low number of images (5 or so). But I'm unable to use it for displaying 22 images as i get an out of memory error, and the app force closes. So i read here in StackExchange to replace ViewFlipper with ViewPager, and i get the following errors. Any help will be appreciated. Thanks. Logcat: Pastebin. Sorry to patebin, i couldn't format the logcat well here. Second Activity Java Class: package com.droidrish.www.rishabhtatiraju; import android.app.Activity; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.Button; public class photoActivity extends Activity{ ViewPager vf; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.photography); vf = (ViewPager)findViewById(R.id.viewpager); } Second Activity Layout: here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes http://stackoverflow.com/questions/28505974/android-view-inflateexception-binary-xml-file-line-13-error-inflating-class-v a minute: Sign up Android customizing ViewFlipper up vote 0 down vote favorite So I'm having pretty much exactly the problem described here: http://code.google.com/p/android/issues/detail?id=6191 and until the ViewFlipper issue in 2.1 and 2.2 has been resolved, I'm attempting to customize my own ViewFlipper in the manner described: @Override protected void onDetachedFromWindow() { try { super.onDetachedFromWindow(); } catch (IllegalArgumentException e) { // http://stackoverflow.com/questions/3033875/android-customizing-viewflipper Call stopFlipping() in order to kick off updateRunning() stopFlipping(); } } But I've never done this sort of thing before and am hoping to get a little guidance (as my own efforts are coming up short). Here's what I have so far. FixedFlipper.java: import android.content.Context; import android.util.AttributeSet; import android.widget.ViewFlipper; public class FixedFlipper extends ViewFlipper{ public FixedFlipper(Context context){ super(context); } public FixedFlipper(Context context, AttributeSet attrs){ super(context, attrs); } @Override protected void onDetachedFromWindow(){ try{ super.onDetachedFromWindow(); }catch(Exception e){ super.stopFlipping(); } } } main.xml: All Products Customers Pricing Developers Support Developer Support Consulting Partners Consulting Services Contact Sales Resources Blog FAQ Partners Webinars About Xamarin Blog About Xamarin Questions Best Of... Sign In · Register Welcome Guides Recipes APIs Samples Forums Components Videos Forum › Xamarin Platform › Android Categories Recent Threads Activity Best Of... Unanswered Android.Views.InflateException: Binary XML file line #1: Error inflating class JoseLeeEdwardCarandang Jose Lee Edward CarandangPHMember ✭ May 2014 in Android Hi Guys, Been trying to fix this the whole week, sadly, haven't found a solution. When we developed this application, we used a Samsung Galaxt Note 10.1 with Android 4.1.2. Things have been going well, until this new device was used to run the application. It is a generic brand, running Android 4.2.2. The application doesn't run, raising an exception Android.Views.InflateException: Binary XML file line #1: Error inflating class mdc.ehs.trir.classes.RemarksEditText. Really don't know why, but running in any device using Android lower than 4.2.2 don't have any problem. Android 4.2.2 and above raises the exception. The layout is being inflated in a custom adapter. Basically, the layout represents a single row of information. The custom class (mdc.ehs.trir.classes.RemarksEditText), is just part of the layout that's being inflated in the custom adapter. Hope somebody can help me, i've been working on it the whole week. I'm not even sure if it is Xamarin related or just Android/Java related. Thanks in advance guys. The code for the class: public class RemarksEditText : EditText { #region -- Constructor -- public RemarksEditText(Context context) : base(context) { } public RemarksEditText(Context context, IAttributeSet attrs) : base(context, attrs) { } public RemarksEditText(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { } #endregion #region -- Properties -- public int Position { get; set; } #endregion } The layout that's being inflated: <