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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:28:49+00:00 2026-05-26T14:28:49+00:00

Here is my xml <TextView android:id=@+id/itemNameTextView android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#000000 android:textSize=30sp android:layout_centerVertical=true android:drawableLeft=@drawable/doller android:drawablePadding=30dp android:layout_marginLeft=30dp/>

  • 0

Here is my xml

<TextView android:id="@+id/itemNameTextView"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:textColor="#000000" android:textSize="30sp" 
    android:layout_centerVertical="true" android:drawableLeft="@drawable/doller"
    android:drawablePadding="30dp" android:layout_marginLeft="30dp"/>

<Button android:id="@+id/buttonAdd"
    android:layout_width="wrap_content" android:layout_height="fill_parent"
    android:textColor="#000000" android:background="#00000000"
    android:layout_alignParentRight="true" android:layout_marginRight="10dp"
    android:text="ADD" android:textSize="25sp" android:textStyle="bold" />

<EditText android:id="@+id/displayPriceEditText"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textColor="#000000" android:textSize="30sp" android:hint="0.00"
    android:layout_centerVertical="true" android:layout_toLeftOf="@id/buttonAdd"
    android:layout_marginRight="40dp" android:background="#00000000"/>

I should be able to add some text both in editText and textView and when i click the button the same layout has to appear just below this one( like a list ). Can anyone please help me on this?

  • 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-26T14:28:50+00:00Added an answer on May 26, 2026 at 2:28 pm

    have two XMl files… the row (row.xml)or what ever reusable stuff you want to add as one view is one and the view to which it needs to be added to is another listbased.xml… in the second one have a button and all the other stuff that needs to go in…. Make sure that you have a parent view inside the listbased.xml(relative,linear,listview)…. or something like that…

    now… in the class… where this method needs to be called set the R.setContentView(r.layout.listbased)....
    and

    where you implement a button listener then add an inflater (ex:parentLayout.addView(mInflater.inflate(R.layout.row)))... where

    public LayoutInflater mInflater; is defined as a global…

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

Sidebar

Related Questions

I have a textView in xml here. <TextView android:id=@+id/bookTitle android:layout_width=match_parent android:layout_height=wrap_content android:layout_weight=1 android:drawableLeft=@drawable/checkmark android:gravity=center_vertical
I have the following ImageView and TextView: Here is the XML: <LinearLayout android:layout_height=wrap_content android:layout_width=match_parent
Using Android, here is part of a layout xml file: <LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical
Here is some xml for a row in a ListView: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content
Here's my layout code; <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent> <TextView android:text=@string/welcome
I'm trying to create a custom Android compound view, here is the code: <?xml
I have a TableRow with a TextView . Here is the xml for it.
Here's the XML file i'm working on: <list> <activity>swimming</activity> <activity>running</activity> <activity>soccer</activity> </list> The index.php,
Here's the XML code I'm working with: <inventory> <drink> <lemonade supplier=mother id=1> <price>$2.50</price> <amount>20</amount>
Here is my XML Response: <DIDL-Lite xmlns=urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/ xmlns:dc=http://purl.org/dc/elements/1.1/ xmlns:upnp=urn:schemas-upnp-org:metadata-1-0/upnp/ <item id=1182 parentID=40 restricted=1> <title>Hot

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.