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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:14:58+00:00 2026-06-17T05:14:58+00:00

I am developing Splash screen, GridView , ListView and 4 other codes. Since every

  • 0

I am developing Splash screen,GridView, ListView and 4 other codes.

Since every item click in GridView namely Image,video,document and upload displays the same items in ListView(my code is like that) I am confused as to how to apply the loops in the onItemClick(AdapterView parent, View view, int position, long id) method so that i can display image code,video code,document code and uploading code in accordance with the items in GridView and ListView

To be very precise just go through the flow below

1.Image(Grid View)—–Onclick—->Item1(listview)–Onclick()–>Image Code

                          ---->Item2(listview)--Onclick()-->Image Code
                          ---->Item3(listview)--Onclick()-->Image Code
                          ---->Item4(listview)--Onclick()-->Image Code

2.Video(Grid View)—–Onclick—->Item1(listview)–Onclick()–>Video Code

                          ---->Item2(listview)--Onclick()-->Video Code
                          ---->Item3(listview)--Onclick()-->Video Code
                          ---->Item4(listview)--Onclick()-->Video Code

3.Document(Grid View)—–Onclick—->Item1(listview)–Onclick()–>Document Code

                          ---->Item2(listview)--Onclick()-->Document Code
                          ---->Item3(listview)--Onclick()-->Document Code
                          ---->Item4(listview)--Onclick()-->DocumentCode

4.Upload(Grid View)—–Onclick—->Item1(listview)–Onclick()–>Upload Code

                          ---->Item2(listview)--Onclick()-->Upload Code
                          ---->Item3(listview)--Onclick()-->Upload Code
                          ---->Item4(listview)--Onclick()-->UploadCode

Thanks in advance if anybody could help it would be fantastic

  • 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-17T05:15:00+00:00Added an answer on June 17, 2026 at 5:15 am

    If your grid screen and list screen are seperate activities, then you can pass the “type” of the grid option that was selected by the user as an extra in the intent you are using to start the list activity. And then depending on this value, you can decide the action that is to be taken in the onItemClick.
    Hope that helps.

    1. Define the types for your operations. like,

      public static final int OPTION_IMAGECODE = 1 ;

      public static final int OPTION_VIDEOCODE = 2 ; …etc

      and a varaible to hold the type like, private int selectedGridOption ;

    2. When user clicks on the grid option, populate the variable. Like,

      selectedGridOption = OPTION_IMAGECODE ; if the user selectes the image type.

    3. In your intent you use to start the list activity put this value as an extra. Like,
      listActivityIntent.putExtra(“Selected Option”, selectedGridOption) ;

    4. In you list activity you can retreive this value as,

      getIntent().getIntExtra(“Selected Option”, *default_value_you_want*) ;

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

Sidebar

Related Questions

I am developing an Android application which involves splash screen. There is a screen
I am developing an android app in which the first screen is the splash
Possible Duplicate: Displaying splash screen for longer than default seconds I am developing a
I am developing an app in which i had used splash screen. But after
I'm developing a wordpress theme for general release. I want to display an image
I am developing a PhoneGap (2.1) for Android using Eclipse. I had a splash
Developing an MVC application, i now need to have test other browser versions. Installed
I am developing an iPhone application using restful web service.I want to implement splash
I have been testing and developing my app since few months and now, app
Developing for Android 2.3, I have a question regarding layouts. I use a vertival

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.