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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:07:35+00:00 2026-05-20T13:07:35+00:00

BACKGROUND: My working app contains a GridView with 5 rows of 11 columns with

  • 0

BACKGROUND:
My working app contains a GridView with 5 rows of 11 columns with an overridden adapter for display. It works great for my needs with a large display tablet.

After porting to a small scale smartphone, I realize that the grid is unusable, due to its small size. Rather than implement landscape orientation I’ve decided to use a zoom function.

QUESTION:
What is the best way to implement the following 2 basic functions: Zoom (allow zoom between 100 and 400%) and Scroll (up/down/right/left)

  • 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-20T13:07:36+00:00Added an answer on May 20, 2026 at 1:07 pm

    My solution was to create a layout recalculation routine, changing the # of columns and their sizes

    There may be a better way, but with no replies, this is a quick and dirty hack that worked

    public void gvlpRecalc() {
        m_gv.setNumColumns(m_Columns);
        if ((btnWidth = (int) (m_gv.getWidth() / m_Columns + .5)) == 0) {
          Display display = ((Activity) m_Context).getWindowManager().getDefaultDisplay();
          btnWidth = (int) (display.getWidth() / m_Columns + .5);
          switch (m_Columns) {
            case 8:
              btnHeight = (int) (btnWidth * .9);
              break;
            case 10:
              btnHeight = (int) (btnWidth * 1.2);
              break;
            default:
              btnHeight = btnWidth;
          }
        } else
          switch (m_Columns) {
            case 8:
              btnHeight = (int) (btnWidth * .9);
              break;
            case 10:
              btnHeight = (int) (btnWidth * 1.2);
              break;
            case 11:
              btnHeight = btnWidth;
              break;
            default:
              btnHeight = (int) (m_gv.getHeight() / 2.2);
          }
        gvlp = new GridView.LayoutParams(btnWidth, btnHeight);
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background So, I'm working on a fresh iteration of a web app. And, we've
Background: I am writing a C++ program working with large amounts of geodata, and
Background information: I'm working on a small app for myself and a few friends,
Background: I'm working on a single page web app that loads everything through AJAX
i'm working on an audio based app. audio is playing in the background but
Background: I am an intermediate web app developer working on the .Net Platform. Most
Background: I am working on an ASP.NET MVC app that has 3 partials (based
I'm working on an app that monitors significant location changes in the background. I've
Background: I'm using WPF and C# (3.5) and am working on an app that
I am working on an MVVM app that performs several tasks in the background,

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.