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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:44:01+00:00 2026-05-30T10:44:01+00:00

I have a View like this: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical > <ScrollView android:layout_width=fill_parent

  • 0

I have a View like this:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <RelativeLayout 
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical">
        <TextView
            android:id="@+id/tvDialogTitle"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="Information" 
            android:padding="6dip"
            android:textStyle="bold"/>
        <TextView
            android:id="@+id/tvDialogEmail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Email: " 
            android:padding="6dip"
            android:textStyle="bold"
            android:layout_below="@id/tvDialogTitle"/>
        <EditText
            android:id="@+id/etDialogEmail"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="6dip"
            android:layout_below="@id/tvDialogTitle"
            android:layout_toRightOf="@id/tvDialogEmail"/>
        <TextView
            android:id="@+id/tvDialogPassword"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Password: " 
            android:padding="6dip"
            android:textStyle="bold"
            android:layout_below="@id/etDialogEmail"/>
        <EditText
            android:id="@+id/etDialogPassword"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="6dip"
            android:layout_below="@id/etDialogEmail"
            android:layout_toRightOf="@id/tvDialogPassword"/>
        <TextView 
            android:id="@+id/tvDialogNumberRe"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Re- number: " 
            android:padding="6dip"
            android:textStyle="bold"
            android:layout_below="@id/etDialogPassword"/>
        <EditText
            android:id="@+id/etDialogNumberRe"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="6dip"
            android:layout_below="@id/etDialogPassword"
            android:layout_toRightOf="@id/tvDialogNumberRe"/>
        <TextView 
            android:id="@+id/tvDialogEmailRe"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Re- email: " 
            android:padding="6dip"
            android:textStyle="bold"
            android:layout_below="@id/etDialogNumberRe"/>
        <EditText
            android:id="@+id/etDialogEmailRe"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="6dip"
            android:layout_below="@id/etDialogNumberRe"
            android:layout_toRightOf="@id/tvDialogEmailRe"/>
        <TextView 
            android:id="@+id/tvDialogVerifyCode"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Verify code: " 
            android:padding="6dip"
            android:textStyle="bold"
            android:layout_below="@id/etDialogEmailRe"/>
        <EditText
            android:id="@+id/etDialogVerifyCode"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="6dip"
            android:layout_below="@id/etDialogEmailRe"
            android:layout_toRightOf="@id/tvDialogVerifyCode"/>
    </RelativeLayout>
</ScrollView>

Now I want to bind this view to a AlertDialog. I just know that I can use the .setView method. Nevertheless, I do not know how to use the children such as EditText, TextView in the binded View. For example, I want to get the text in some TextView after clicking OK button in the AlertDialog.

Could anybody help me please. Thanks in advance.

  • 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-30T10:44:03+00:00Added an answer on May 30, 2026 at 10:44 am

    you need to inflate your layout into dialog’s view and retrieve TextViews/EditTexts from the inflated view:

    LayoutInflater li = getLayoutInflater();// LayoutInflater.from(getBaseContext());
    View view = li.inflate(R.layout.your_dialog_layout, null);
    
    EditText email = (EditText) view.findViewById(R.id.etDialogEmail);
    TextView title = (TextView) view.findViewById(R.id.tvDialogTitle);
    //and your other stuff....
    
    AlertDialog.Builder bldr = new AlertDialog.Builder(getBaseContext());
    bldr.setView(view);
    AlertDialog diag = bldr.create();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a base view in XML. <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"><TextView android:layout_height="wrap_content" android:layout_width="fill_parent"
In My Application, My XML layout is like this: <RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent> <View class=com.project.twsbi.FingerPaint$MyView
I have row for ListView(listview is inside LinearLayout) like <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android
My XMl Layout is as like below: <RelativeLayout android:id=@+id/dateSelectionLayout android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical android:visibility=visible> <EditText
I have a mvc2 application with a view like this <% using (Ajax.BeginForm(UserApprove, new
I have a View that renders something like this: Item 1 and Item 2
I have added a UILabel to my view programmatically like this: myLabel = [[UILabel
Let's say I have some classes like this: abstract class View(val writer: XMLStreamWriter) {
I'm having some difficulties with Ajax.BeginForm I have something like this in a view
I have a list view that looks like this and that's its code ..

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.