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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:28:57+00:00 2026-06-01T14:28:57+00:00

How would I remove a view from this dialog? I know I can remove

  • 0

How would I remove a view from this dialog? I know I can remove a view from a LinearLayout.removeView(id)( LinearLayout.removeView(View) ), so if someone could tell me how to get (LinearLayout) R.layout.database_creation_form, that would be nice too. I am using Android-SDK V7

Java Code:

@Override
protected DialogInterface onCreateDialog(int id){
    LayoutInflater factory = LayoutInflater.from(getBaseContext());
    final View textEntryView = factory.inflate(R.layout.database_creation_form, null);
    setDialogViewAttributes(textEntryView);
    final EditText editText = (EditText)textEntryView.findViewById(R.id.create_form_db_name_et2);
    final Spinner spinner = (Spinner)textEntryView.findViewById(R.id.create_form_type_sp);
    return new AlertDialog.Builder(FileBase.this)
        .setTitle(R.string.create_database_string)
        .setView(textEntryView)
        .show();
}

XML for database_creation_form:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" android:paddingTop="25px">


<TextView
    android:id="@+id/create_form_db_name_tv"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:text="@string/create_form_db_name"
    android:textAppearance="?android:attr/textAppearanceLarge" android:paddingBottom="25px"/>

<EditText
    android:id="@+id/create_form_db_name_et2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:inputType="text">

    <requestFocus />
</EditText>


<TextView
    android:id="@+id/create_form_type_tv"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/create_form_type"
    android:textAppearance="?android:attr/textAppearanceLarge"        android:gravity="center"/>

<Spinner
    android:id="@+id/create_form_type_sp"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />

</LinearLayout>
  • 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-01T14:28:59+00:00Added an answer on June 1, 2026 at 2:28 pm

    Try this :

      final LinearLayout textEntryView = (LinearLayout) factory.inflate(R.layout.database_creation_form, null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This view function: @login_required def dashboard(request): from myproject.myapp.models import UserProfile k = UserProfile.objects.get( user=request.user.pk
How would I remove the border from an iframe embedded in my web app?
Using Javascript how would I remove any number of ../ from a relative path?
I would like to remove the domain/computer information from a login id in C#.
I would like to remove two files from a folder at the conclusion of
I would like to remove selected commit log entries from a linear commit tree,
trying to create a form inside a modal dialog. But i would like this
Hi Is there a way to remove a view from another view of a
From the standard view-based application, I found that the generated code did this: self.window.rootViewController
I can edit this UserControl just fine in visual studio but I get this

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.