Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:52:00+00:00 2026-06-12T17:52:00+00:00

The exception: > 10-13 11:47:32.151: E/AndroidRuntime(618): FATAL EXCEPTION: main > > 10-13 11:47:32.151: E/AndroidRuntime(618):

  • 0

The exception:

>         10-13 11:47:32.151: E/AndroidRuntime(618): FATAL EXCEPTION: main
> 
>     10-13 11:47:32.151: E/AndroidRuntime(618): android.view.InflateException: Binary XML file line #3: Error
> inflating class com.example.demo.ToDoListView 10-13 11:47:32.151:
> E/AndroidRuntime(618):    at
> android.view.LayoutInflater.createView(LayoutInflater.java:596) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.view.LayoutInflater.inflate(LayoutInflater.java:466) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.LayoutInflater.inflate(LayoutInflater.java:396) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:371)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.widget.ArrayAdapter.getView(ArrayAdapter.java:362) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.widget.AbsListView.obtainView(AbsListView.java:2267) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.widget.ListView.measureHeightOfChildren(ListView.java:1244)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.widget.ListView.onMeasure(ListView.java:1156) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.View.measure(View.java:15172) 10-13 11:47:32.151:
> E/AndroidRuntime(618):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4814)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.View.measure(View.java:15172) 10-13 11:47:32.151:
> E/AndroidRuntime(618):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4814)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.View.measure(View.java:15172) 10-13 11:47:32.151:
> E/AndroidRuntime(618):    at
> android.widget.RelativeLayout.measureChild(RelativeLayout.java:602)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.widget.RelativeLayout.onMeasure(RelativeLayout.java:415) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.View.measure(View.java:15172) 10-13 11:47:32.151:
> E/AndroidRuntime(618):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4814)
> 10-13 11:47:32.151: E/AndroidRuntime(618):    at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 10-13
> 11:47:32.151: E/AndroidRuntime(618):  at
> android.view.View.measure(View.java:15172) 10-13 11:47:32.151:
> E/AndroidRuntime(618):    at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:833)

This is my xml. It show no errors.

<?xml version="1.0" encoding="utf-8"?>

<com.example.demo.ToDoListView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:padding="10dp"
  android:scrollbars="vertical"
  android:textColor="@color/notepad_text"
  android:fadingEdge="vertical"
/> 

I am trying to use it with a list adapter:

        aa=new ArrayAdapter<String>(this, R.layout.todolist_item,todoItems);

To Do list class:

public class ToDoListView extends TextView{
    private Paint marginPaint;
    private Paint linePaint;
    private int paperColor;
    private float margin;

    public ToDoListView(Context context) {
        super(context);
        // TODO Auto-generated constructor stub
    }

    public ToDoListView(Context context, AttributeSet st, int ds) {
        super(context);
        init();
    }

    private void init() {
      Resources myResources=getResources();
      marginPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
      marginPaint.setColor(myResources.getColor(R.color.notepad_margin));
      linePaint=new Paint(Paint.ANTI_ALIAS_FLAG);
      linePaint.setColor(myResources.getColor(R.color.notepad_lines));
      paperColor=myResources.getColor(R.color.notepad_paper);
      margin=myResources.getDimension(R.dimen.notepad_margin);      
    }

    @Override
    protected void onDraw(Canvas canvas) {
        canvas.drawColor(paperColor);
        canvas.drawLine(0, 0, 0, getMeasuredHeight(), linePaint);
        canvas.drawLine(0, getMeasuredHeight(), getMeasuredWidth(), getMeasuredHeight(), linePaint);
        canvas.drawLine(margin, 0, margin, getMeasuredHeight(), marginPaint);
        canvas.save();
        canvas.translate(margin, 0);
        super.onDraw(canvas);
        canvas.restore();
    }



}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:52:02+00:00Added an answer on June 12, 2026 at 5:52 pm

    If you use the custom view in the xml layout that you need to modify this constructor:

    public ToDoListView(Context context, AttributeSet st, int ds) {
        super(context);
        init();
    }
    

    to:

    public ToDoListView(Context context, AttributeSet st) {
        super(context, st);
        init();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Exception in thread main java.lang.NullPointerException at Library.loadBooks(Library.java:179) at UseLibrary.main(UseLibrary.java:105) This error makes me crazy!
Argument exception error is thrown at the following code. It's a simple code but
I am getting an exception error, Input string was not in a correct format.
I am getting following exception while ftp file over to some other machine. org.apache.commons.net.io.CopyStreamException:
I am experiencing a problem with android emulator as described @ https://stackoverflow.com/questions/3986202/exception-after-starting-emulator-ddms-null Can someone
I am trying to setText() to a TextView resource from a layout XML file.
Exception occurred executing command line. Cannot run program /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java (in directory /Users/zhangstudyro/Developer/Java/HiWorld): error=2, No
Exception is : Resources.NotFoundException 11-30 17:38:17.843: I/class fyp.proj.crud.DisplayProjects$ListAdapter(967): android.content.res.Resources$NotFoundException: String resource ID #0x9 Firstly,
Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000 What is Kernel protection error?
I've got an exception I don't understand: [2012-10-09 08:59:56:152 CEST] 000000a0 SystemOut O 08:59:56,151

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.