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

  • SEARCH
  • Home
  • 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 532369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:23:51+00:00 2026-05-13T09:23:51+00:00

This is one of those cases where I had the code working, tried to

  • 0

This is one of those cases where I had the code working, tried to add something else, and then found that my previous code has stopped working. It crashes when the program starts. The error seems to lie with the definition of the ArrayAdapter custom class, as if I try using a built in adapter, it works fine. Any help?

public class MainEntry extends ListActivity{    

private String[] items = {"yay","yay2","asdfa","nlah","lipsum","orum","rawr"};



/** Called when the activity is first created. */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setListAdapter(new IconicAdapter());
}


class IconicAdapter extends ArrayAdapter {
    IconicAdapter(){
        super(MainEntry.this, R.layout.post_obj, items);
    }

    public View getView(int pos, View convertView, ViewGroup parent){
        LayoutInflater inf = getLayoutInflater();

        View row = null;
        if(convertView==null){
            inf.inflate(R.layout.post_obj, parent, false);
        }else{
            row = convertView;
        }
        inf.inflate(R.layout.post_obj, parent, false);

        TextView label = (TextView) row.findViewById(R.id.label);
        label.setText(items[pos]);

        ImageView image = (ImageView) row.findViewById(R.id.icon);
        image.setImageResource(((Math.random()>.5)?R.drawable.wolfire:R.drawable.android)); //temp

        return row;
    }

}

}

Here’s the LogCat log if it helps:

12-29 23:43:49.968: INFO/ActivityManager(564): Start proc com.test.TestApp for 

activity com.test.TestApp/.MainEntry: pid=783 uid=10023 gids={1015}
12-29 23:43:50.118: INFO/jdwp(783): received file descriptor 10 from ADB
12-29 23:43:50.188: DEBUG/ddm-heap(783): Got feature list request
12-29 23:43:50.318: WARN/ActivityThread(783): Application com.test.TestApp is waiting for the debugger on port 8100...
12-29 23:43:50.348: INFO/System.out(783): Sending WAIT chunk
12-29 23:43:50.348: INFO/dalvikvm(783): Debugger is active
12-29 23:43:50.577: INFO/System.out(783): Debugger has connected

12-29 23:43:50.577: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:50.638: INFO/ARMAssembler(564): generated scanline__00000077:03515104_00001001_00000000 [ 64 ipp] (84 ins) at [0x2c2900:0x2c2a50] in 1189200 ns
12-29 23:43:50.778: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:50.987: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:51.187: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:51.387: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:51.597: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:51.800: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:52.003: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:52.206: INFO/System.out(783): waiting for debugger to settle...
12-29 23:43:52.218: INFO/ActivityManager(564): Killing process com.test.TestApp (pid=783) at user's request
12-29 23:43:52.228: INFO/Process(564): Sending signal. PID: 783 SIG: 9
12-29 23:43:52.238: INFO/ActivityManager(564): Process com.test.TestApp (pid 783) has died.
12-29 23:43:52.298: WARN/UsageStats(564): Unexpected resume of com.android.launcher while already resumed in com.test.TestApp
12-29 23:43:52.348: WARN/InputManagerService(564): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43944340
12-29 23:43:57.517: DEBUG/dalvikvm(719): GC freed 726 objects / 64112 bytes in 83ms
  • 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-05-13T09:23:51+00:00Added an answer on May 13, 2026 at 9:23 am

    Ahhh… I am such an idiot. Lol. I didn’t actually set ‘row’ to the value of inf.inflate().

    Facepalm Yup. Disregard this. Well hopefully someone else will find the code useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is one of those things that you read once, say aha! and then
This is one of those meta-programming questions that may or may not belong on
Hey, so this is one of those questions that seems obvious, and I'm probably
I had a working project. After rearranging some code, I tried to recompile my
Initially this demo application I'm working on had just one page with a simple
This is one of those ajax alternate flow questions. Normally I expect my ajax
This is one of those little detail (and possibly religious) questions. Let's assume we're
This is one of those I probably should know this, but I don't questions.
This is probably one of those easy questions.. I'm trying to redirect the user
This is just one of those little things I did all the time in

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.