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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:13:42+00:00 2026-06-17T23:13:42+00:00

I created an app, it’s finely working as what i want on minsdkversion=3 .

  • 0

I created an app, it’s finely working as what i want on minsdkversion="3". But other activities look even bigger than usual. If i change the minsdkversion="8" or something, the other activities looks as normal, but i didn’t get the output i want.

Following is the code for gridview and imageview layout files:

activity_main.xml:

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<GridView
    android:id="@+id/grid_View"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:horizontalSpacing="0dp"
    android:numColumns="4"
    android:stretchMode="columnWidth"
    android:verticalSpacing="0dp"
    android:gravity="center_horizontal"
    android:clipChildren="true" >

</GridView>

</LinearLayout>

grid.xml:

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

<ImageView
    android:id="@+id/image_View"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_weight="0.05"/>
</LinearLayout>

MainActivity.java:

public View getView(int position, View convertView, ViewGroup parent)
    {
        ImageView imageView;

        if (convertView == null)
        {
            imageView = new ImageView(mContext);
            imageView.setLayoutParams(new GridView.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
            i = i+1;
            imageView.setId(i);
            Log.d("=====  i value =====", String.valueOf(i));
            imageView.setAdjustViewBounds(true);
            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        }
        else
        {
            imageView = (ImageView) convertView;
        }

        imageView.setImageResource(mThumbIds[position]);

        return imageView;
    }

What is the wrong with my code, what i have to change?

  • 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-17T23:13:43+00:00Added an answer on June 17, 2026 at 11:13 pm

    I have to show some toast when particular body part is pressed

    Step #1: Display the body in an ImageView

    Step #2: Override onTouchEvent() in your activity or fragment that is managing the ImageView

    Step #3: Determine the body part based on the location of the touch event and the size of the ImageView, and display your Toast

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

Sidebar

Related Questions

I created an app that uses the android-viewflow and it has minSdkVersion=1 , but
I created an app that acts as a launcher, which works as expected, but
I created an app and it works fine. The next step I want to
I created my App Id in the Apple Dev Portal with lowercase name but
I created app in android, everywhere looks great, but on the phone which has
I found out that my created app design is not properly working on samsung
I want to optimize and increase the downloads of my created app. I recently
I created an app today, as i've done several times before. But when i
I've created app.It working fine. When i've changed some code and compile, it throws
Im on a stage where i will publish my created app now. But 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.