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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:43:36+00:00 2026-06-04T08:43:36+00:00

Hi I created one medical app. it,s working fine. i placed one logo in

  • 0

Hi I created one medical app. it,s working fine. i placed one logo in center of the app screen my logo size height and width is 70×70 and my emulator screen resolution is 900 x 800 if i change my screen resolution i wish to change my logo size also dynamic. this is my doubt how to set logo depending upon the screen resolution?

code:

public class ImageviewAppActivity extends Activity {

    private ImageView img; 
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        img =(ImageView) findViewById(R.id.imagetest);
        img.setMaxWidth(20);
        img.setMaxHeight(100);


    }
}

xml: main.xml

<?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" >

    <ImageView
        android:id="@+id/imagetest"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_launcher" />

</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-04T08:43:38+00:00Added an answer on June 4, 2026 at 8:43 am

    Look,I think you should set size of logog according to diffrent resolution
    then try to use

    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);
    float density = metrics.density;
    

    density is float and its value changed as per screen size…

    so,if you have

    240*320 density is 0.5
    320*480 density is 1.0
    480*800 density is 1.5
    

    and set size using density like , img.setMaxHeight(density*100);

    and also put multiple screen supports in manifest file…Multiple Screen Support

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

Sidebar

Related Questions

I created one application, its working fine. I want to support my application in
i created one grid view application, it's working fine now showing all images in
I created one media player, its working fine. I wish to create one popup
I created one alert dialog box, it's working fine for me. Now i am
I have created one webservice for accessing database.it's working fine .but when i am
I created one app for database which contains a student table and 3 fields
I created one application to read all the contacts stored in android 2.0 emulator.I
I have a medical app for the iPhone that I'm working on, where a
I have created one Login Screen where user enter their mail id. But i
I created one application in Eclipse . I deployed that application in Google App

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.