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 7738219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:12:29+00:00 2026-06-01T08:12:29+00:00

I have a launcher activity which contains two tabs which corresponds to two separate

  • 0

I have a launcher activity which contains two tabs which corresponds to two separate activities HeatMap and LiveMkt.

As I read somewhere one can not use following statement in child activities:

Window.RequestFeature(WindowFeatures.CustomTitle);

So I tried following….

OnCreate() of Launcher activity contains :

base.OnCreate (bundle);
Window.RequestFeature(WindowFeatures.CustomTitle);
SetContentView(Resource.Layout.TabView);
//Code to create tabs which points to two activities `HeatMap` and `LiveMkt`

OnCreate() of LiveMkt contains :

base.OnCreate (bundle);
SetContentView(Resource.Layout.LiveMkt);
Window.SetFeatureInt(WindowFeatures.CustomTitle,Resource.Layout.TitleBar);
edsearch = (EditText) FindViewById(Resource.Id.edsearch);       
_autoSearchBox = new AutoSearchBox();                       
_autoSearchBox.LoadSearchBox(this,edsearch,lsym);

where AutoSearchBox class has LoadSearchBox() which contains

public void LoadSearchBox(Activity activity,EditText edsearch,ListView lsym)
{
    edsearch.TextChanged+= delegate 
    {//Something
     }
}

But when I debugged this, I get NullPointerException in LoadSearchBox() for edsearch and lsym even though I have these two elements in LiveMkt and passing them to LoadSearchBox().

LiveMkt.xml contains ListView lsym and TitleBar.xml contains EditText edsearch.

StackTrace:

Exception Details : System.NullReferenceException: Object reference not set to an instance of an object

at AutoSearchBox.LoadSearchBox (Android.App.Activity activity, Android.Widget.EditText edsearch, Android.Widget.ListView lsym)

As I’m new to Mono Android, any help appreciated.

  • 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-01T08:12:31+00:00Added an answer on June 1, 2026 at 8:12 am

    Are you sure that edsearch is not null? The FindViewById method returns null if it couldn’t find the view, so it’s possible that’s what’s happening for you.

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

Sidebar

Related Questions

I have an application that contains two Activities with <intent-filter> <action android:name=android.intent.action.MAIN/> <category android:name=android.intent.category.LAUNCHER/>
I have an app that goes between many different activities. One activity, my main
I have ScrollView which contains 10 buttons. When a activity is launched only first
I have a Weather app with four Activities. The main/launcher activity is 'invisible' using...
I'm writing an application which have two modes; one view mode and one edit
I have two classes which extend Activity and need to call another class method
i have a grid view which contain images when click on one image it
I have three activities in my android app. First activity is main application screen
I’m new to android,I have an activity class which fetches Json string from url
I have here two applications in two different projects in eclipse. One application (A)

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.