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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:00:15+00:00 2026-05-26T01:00:15+00:00

I have a app that shows the camera view on the screen on a

  • 0

I have a app that shows the camera view on the screen on a FrameLayout. The screen is in fixed LandScape mode.

I need to write a textView with dynamically determined coordinates of the screen. The coordinates are determined in percentages, for example :

write the textview on the coorinates x=80% of the screen & y=20% of the screen. write the textview on the coorinates x=35% of the screen & y=55% of the screen.

how to do it? i already have the percentages, i only need to know how to use them to write the textview on the desired position of the frameLayout

code examples are welcome

i tried with this but doesn’t works, the textview isn’t moved:

TextView poi..... etc etc
poi.setLayoutParams(new LayoutParams((int)(w*(xCoordPercent/100)), h/2));

thanks

  • 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-26T01:00:15+00:00Added an answer on May 26, 2026 at 1:00 am
    MarginLayoutParams params=(MarginLayoutParams )poi.getLayoutParams();
    params.leftMargin=80;
    //here 100 means 100px,not 80% of the width of the parent view
    //you may need a calculation to convert the percentage to pixels. 
    params.topMargin=50;
    poi.setLayoutParams(params);
    

    This may help.

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

Sidebar

Related Questions

I have a app that shows the camera view on the screen on a
I have an iPhone app that shows a simple view (View 1) that has
I have recently built an application that shows you a camera preview on screen.
I have an app that shows a series of UIImageView s on a ScrollView
have an app that finds your GPS location successfully, but I need to be
I have a Opengl ES 1.x ANdroid 1.5 app that shows a Square with
I have an app that loads an URL. My problem is that it shows
I have an app that shows store sales. It is a multi-dimensional array, so
I've got a sample application on http://github.com/niklassaers/Test-iPhone-TabBar-App that shows my problem: I have a
I want to make an app that shows where is a location on screen.

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.