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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:26:34+00:00 2026-05-22T19:26:34+00:00

I invoke new activity in my Android application: Intent intent = new Intent(); intent.setClass(getApplicationContext(),

  • 0

I invoke new activity in my Android application:

Intent intent = new Intent();   
intent.setClass(getApplicationContext(), UserInfo.class);
startActivity(intent);

In new activity I call setContentView as usual:

public void OnCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.userfill);

However I see only black screen with activity label in the header!

Manifect file contains

<activity
  android:name=".UserInfo"
  android:label="@string/title_fill">
</activity>

userfill.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent" android:orientation="vertical" android:id="@+id/MainLinearLayout">
    <TableLayout android:layout_height="wrap_content" android:id="@+id/tableLayout" android:layout_width="match_parent">
        <TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1" android:layout_weight="1" android:layout_width="match_parent">
            <AutoCompleteTextView android:layout_height="70dip" android:text="@string/enterTeg" android:id="@+id/autoCompleteTextView1" android:layout_width="match_parent"></AutoCompleteTextView>
        </TableRow>
        <TableRow android:layout_height="wrap_content" android:id="@+id/tableRow2" android:layout_weight="1" android:layout_width="match_parent">
            <AutoCompleteTextView android:layout_height="70dip" android:layout_width="match_parent" android:text="@string/enterTeg" android:id="@+id/autoCompleteTextView2"></AutoCompleteTextView>
        </TableRow>
        <TableRow android:layout_height="wrap_content" android:id="@+id/tableRow3" android:layout_weight="1" android:layout_width="match_parent">
            <AutoCompleteTextView android:layout_height="70dip" android:layout_width="match_parent" android:text="@string/enterTeg" android:id="@+id/autoCompleteTextView3"></AutoCompleteTextView>
        </TableRow>
        <TableRow android:layout_height="wrap_content" android:id="@+id/tableRow4" android:layout_width="wrap_content" android:layout_weight="1">
            <ListView android:layout_height="wrap_content" android:id="@+id/listTimes" android:layout_width="match_parent"></ListView>
        </TableRow>
        <TableRow android:id="@+id/tableRow5" android:layout_height="match_parent" android:layout_weight="1" android:layout_width="match_parent" android:orientation="horizontal">
            <Button android:id="@+id/button1" android:layout_height="wrap_content" android:text="@string/btnOK" android:layout_weight="1" android:layout_width="150dip"></Button>
            <Button android:id="@+id/button2" android:layout_height="wrap_content" android:text="@string/btn_cancel" android:layout_weight="0" android:layout_width="160dip"></Button>
        </TableRow>
    </TableLayout>
</LinearLayout>

Why I don’t see all the controls?In Graphical Layout it’s all right.

  • 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-22T19:26:36+00:00Added an answer on May 22, 2026 at 7:26 pm

    The onCreate-methods name starts with lower case.

    Also, it’s unnecessary to define a layout_width or layout_height in a TableRow:

    The children of a TableLayout cannot
    specify the layout_width attribute.
    Width is always MATCH_PARENT. However,
    the layout_height attribute can be
    defined by a child; default value is
    WRAP_CONTENT. If the child is a
    TableRow, then the height is always
    WRAP_CONTENT.

    See here.

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

Sidebar

Related Questions

Been trying to call Preferences.java class using: Intent settingsActivity = new Intent(getBaseContext(), Preferences.class); startActivity(settingsActivity);
public class screen2 extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.screen2);
I have an application, call App1. In my App1 I invoke Camera application. intent
I've read that the C# version is as follows: Application.Current.Dispatcher.Invoke( DispatcherPriority.Background, new Action(delegate {
I am using startActivity to call another Activity and I get the Activity Not
i have executed the following code public class Activity_Threads_Handler extends Activity { private int
I am attempting to create an enhanced Intent class (I call it DataIntent )
Is there any essential difference between this code: ThreadStart starter = new ThreadStart(SomeMethod); starter.Invoke();
I invoke a shell command by Process class from java and it prints stty:
For invoke search android example, every time query search result is received by onCreate().

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.