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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:53:27+00:00 2026-06-10T18:53:27+00:00

I’m new with android, and I have to make improvements for an existing app.

  • 0

I’m new with android, and I have to make improvements for an existing app. Inside this app we have a relative layout with a group of 15 imageViews, 1 dynamic imageView and two textViews to which I have to program zoom controls for zooming in and out. The last couple of days I’ve been reading continuously this website to try to find an answer in the existing questions without any results because lots of questions are without an answer.

My biggest problem is that I don’t know which frame or layout to use. All the images are placed and working well in the relative layout, but I don’t seem to get the zoom controls working with the content and I’ve read in different threads and questions that the RelativeLayout doesn’t work with zoom at all. I thought of maybe using a FrameLayout but I think it has the same problem.

This is the XML code from the layout:

<RelativeLayout
        android:id="@+id/relativeLayoutMachine"
        android:layout_width="1000dp"
        android:layout_height="550dp"
        android:layout_above="@+id/relativeLayout1"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@color/brm_back_1" >

        <ImageView
            android:id="@+id/imageView01"
            android:layout_width="82dp"
            android:layout_height="67dp"
            android:layout_marginLeft="409dp"
            android:layout_marginTop="83dp"
            android:contentDescription="@id/imageVeuwBandInloopKoker"
            android:src="@drawable/lva_bandinloopkoker" />

        <ImageView
            android:id="@+id/imageView02"
            android:layout_width="82dp"
            android:layout_height="67dp"
            android:layout_marginLeft="409dp"
            android:layout_marginTop="149dp"
            android:contentDescription="@id/imageViewTussenKoker"
            android:src="@drawable/lva_tussenkoker" />

        <ImageView
            android:id="@+id/imageView03"
            android:layout_width="172dp"
            android:layout_height="88dp"
            android:layout_marginLeft="401dp"
            android:layout_marginTop="216dp"
            android:contentDescription="@id/imageViewHMI_Graph_04_Flap"
            android:src="@drawable/lva_flap_open" />

        <ImageView
            android:id="@+id/imageView04"
            android:layout_width="281dp"
            android:layout_height="61dp"
            android:layout_marginLeft="401dp"
            android:layout_marginTop="303dp"
            android:contentDescription="@id/imageViewHMI_Graph_03_Ram"
            android:src="@drawable/lva_ram_retour" />

        <ImageView
            android:id="@+id/imageView05"
            android:layout_width="110dp"
            android:layout_height="47dp"
            android:layout_marginLeft="571dp"
            android:layout_marginTop="257dp"
            android:contentDescription="@id/imageViewHMI_Graph_01_Unit"
            android:src="@drawable/lva_unit" />

        <ImageView
            android:id="@+id/imageView06"
            android:layout_width="51dp"
            android:layout_height="54dp"
            android:layout_marginLeft="431dp"
            android:layout_marginTop="28dp"
            android:contentDescription="@id/imageViewHMI_Graph_15_Feeder"
            android:src="@drawable/lva_feeder_off" />

        <ImageView
            android:id="@+id/imageView07"
            android:layout_width="90dp"
            android:layout_height="40dp"
            android:layout_marginLeft="585dp"
            android:layout_marginTop="218dp"
            android:contentDescription="@id/imageViewHMI_Graph_02_Pump"
            android:src="@drawable/lva_main_motor_off" />

        <ImageView
            android:id="@+id/imageView08"
            android:layout_width="199dp"
            android:layout_height="124dp"
            android:layout_marginLeft="157dp"
            android:layout_marginTop="240dp"
            android:contentDescription="@id/imageViewChannel"
            android:src="@drawable/lva_channel" />

        <ImageView
            android:id="@+id/imageView09"
            android:layout_width="82dp"
            android:layout_height="166dp"
            android:layout_marginLeft="410dp"
            android:layout_marginTop="50dp"
            android:contentDescription="@id/imageViewHMI_Graph_013_Turbo"
            android:src="@drawable/lva_turbo_off"
            android:visibility="invisible" />

        <ImageView
            android:id="@+id/imageView10"
            android:layout_width="88dp"
            android:layout_height="67dp"
            android:layout_marginLeft="402dp"
            android:layout_marginTop="149dp"
            android:contentDescription="@id/imageViewHMI_Graph_012_Perforator"
            android:src="@drawable/lva_perforator_off"
            android:visibility="invisible" />

        <ImageView
            android:id="@+id/ImageView11"
            android:layout_width="88dp"
            android:layout_height="67dp"
            android:layout_marginLeft="408dp"
            android:layout_marginTop="149dp"
            android:contentDescription="@id/ImageViewHMI_Graph_10_Ruffler"
            android:src="@drawable/lva_ruffler_off"
            android:visibility="invisible" />

        <ImageView
            android:id="@+id/ImageView12"
            android:layout_width="174dp"
            android:layout_height="72dp"
            android:layout_marginLeft="362dp"
            android:layout_marginTop="146dp"
            android:contentDescription="@id/ImageViewHMI_Graph_11_Prepress"
            android:src="@drawable/lva_prepress_open"
            android:visibility="invisible" />

        <ImageView
            android:id="@+id/imageView13"
            android:layout_width="46dp"
            android:layout_height="68dp"
            android:layout_marginLeft="356dp"
            android:layout_marginTop="297dp"
            android:contentDescription="@id/imageViewHMI_Graph_07_Needles_Hor"
            android:src="@drawable/lva_needles_hor_none" />

        <ImageView
            android:id="@+id/imageView14"
            android:layout_width="44dp"
            android:layout_height="111dp"
            android:layout_marginLeft="356dp"
            android:layout_marginTop="187dp"
            android:contentDescription="@id/imageViewHMI_Graph_05_Needles_Vert"
            android:src="@drawable/lva_needles_vert_high" />

        <ImageView
            android:id="@+id/imageView15"
            android:layout_width="10dp"
            android:layout_height="24dp"
            android:layout_marginLeft="371dp"
            android:layout_marginTop="272dp"
            android:contentDescription="@id/imageViewHMI_Graph_06_Knotter_Vert"
            android:src="@drawable/lva_motor_off" />

        <FrameLayout
            android:id="@+id/frameLayoutBale"
            android:layout_width="140dp"
            android:layout_height="51dp"
            android:layout_marginLeft="19dp"
            android:layout_marginTop="307dp" >

            <ImageView
                android:id="@+id/imageViewAnimation"
                android:layout_width="140dp"
                android:layout_height="51dp"
                android:layout_gravity="right"
                android:contentDescription="@id/imageViewHMI_Graph_Bale"
                android:scaleType="fitXY"
                android:src="@drawable/baal" />

        </FrameLayout>

        <TextView
            android:id="@+id/textView01"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="110dp"
            android:layout_marginTop="316dp"
            android:gravity="right"
            android:text="@string/percentage"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="@color/brm_back_2" />

        <TextView
            android:id="@+id/textView02"
            android:layout_width="142dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="22dp"
            android:layout_marginTop="271dp"
            android:gravity="center"
            android:text="@string/puntjes"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="@color/brm_back_2" />

        <ZoomControls
            android:id="@+id/zoomControls"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignRight="@+id/textCurrMaterial" />

    </RelativeLayout>

This is the code I used on my main to declare the zoom controls:

btnZoomControls = (ZoomControls) findViewById(R.id.zoomControls);
btnZoomControls.setOnZoomInClickListener(new View.OnClickListener() {public void onClick(View v) {setZoomIn(); }});
btnZoomControls.setOnZoomOutClickListener(new View.OnClickListener() {public void onClick(View v) {setZoomOut(); }});

And this are the functions for zooming in and out

private void setZoomIn()
{
    m_ZoomController.getContainer();
    m_ZoomController.getZoomControls();
    m_ZoomController.setZoomInEnabled(true);
}

private void setZoomOut()
{
    m_ZoomController.getContainer();
    m_ZoomController.getZoomControls();
    m_ZoomController.setZoomOutEnabled(true);
}

Had any of you a similar problem like mine, and how you found a solution to fix it?

  • 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-10T18:53:28+00:00Added an answer on June 10, 2026 at 6:53 pm

    Actually, You have two major ways for zooming:

    1) Call setScaleX() and setScaleY() (since API 11) on whole layout or on particular view. Per my experience, images scaling works fine, but text on some versions produces weird behaviour (this scaling get applied by view group during draw process and so, quite fast). This way is quite smooth and fast for not very big layouts;

    2) Change layout parameters on every view (You might need, probably, to provide new pictures for image views during scaling). This way is not so fast, but should work on almost all android revisions.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.