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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:35:49+00:00 2026-06-17T00:35:49+00:00

I am new to android,Can anyone help me?.I need to show the textview values

  • 0

I am new to android,Can anyone help me?.I need to show the textview values and button and imageview using x,y position.how its possible.My coding.

  <?xml version="1.0" encoding="utf-8"?>
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical"
   android:background="@drawable/levelbg" >

<Button
    android:id="@+id/level1"
    android:layout_width="560dp"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="71dp"
    android:background="@drawable/levelbox"
   />

<TextView
    android:id="@+id/levelno1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_marginTop="43dp"
    android:background="@drawable/levelno" />

<TextView
    android:id="@+id/lastshoot1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/level1"
    android:layout_alignParentLeft="true"
    android:layout_marginBottom="18dp"
    android:layout_marginLeft="85dp"
    android:text="134"
    android:textSize="20sp" />

<TextView
    android:id="@+id/bestshoot1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/lastshoot1"
    android:layout_alignBottom="@+id/lastshoot1"
    android:layout_marginLeft="50dp"
    android:layout_toRightOf="@+id/lastshoot1"
    android:text="123"
    android:textSize="20sp" />

<ImageView
    android:id="@+id/levelonestar1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/bestshoot1"
    android:layout_marginLeft="17dp"
    android:layout_marginBottom="10dp"
    android:layout_toRightOf="@+id/bestshoot1"
    android:src="@drawable/star1" />

<ImageView
    android:id="@+id/levelonestar2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/levelonestar1"
    android:layout_toRightOf="@+id/levelonestar1"
    android:src="@drawable/star1" />

<ImageView
    android:id="@+id/levelonestar3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/levelonestar2"
    android:layout_toRightOf="@+id/levelonestar2"
    android:layout_marginRight="2dp"
    android:src="@drawable/star1" />

I need this via programmatically up to 50 times it should be shown.(50 buttons).Can any one suggest me the alternative way,Thanks for 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-06-17T00:35:50+00:00Added an answer on June 17, 2026 at 12:35 am

    Android >= Honeycomb (self-explaining)

    view.setX(x);
    view.setY(y);
    

    Android < Honeycomb
    Instead of directly setting it to the position you will tell “set it x pixels away from the left/top/right/bottom border”.

    RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
    lp.setMargins(x, y, 0, 0);
    
    view.setLayoutParams(lp);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to android programming and am wondering if anyone can help me on
I am new in android. Can anyone help me to hows truncate table in
Still fairly new to android, wondered if anyone can help... I have an App
Can anyone share code (or point me to Android sample code) to help me
I am new to Android programming and I need help. If any of you
I am new to android.So i can any one sho me how to make
I know that eclipse can do this, can Intellij via the new Android support
I am fairly new to Android programming and was wondering how I can get
I'm quite new to Android development. My understanding is that you can create several
i am creating a new android application.i am using the table layout. I have

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.