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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:48:44+00:00 2026-05-30T23:48:44+00:00

In my app the user spins a carousel. On the selected Item I need

  • 0

In my app the user spins a carousel. On the selected Item I need to display a separate xml view for each item. The carousel is visibile at all time at the bottom with the view visible in the top half. I think that there is a better way than to use fragments. Any ideas? The following code is not functional as of now but I think an inflator may be the way to go but to get it done is troubling me. After case0 there is case1-case5.

 carousel.setOnItemSelectedListener(new OnItemSelectedListener(){

        public void onItemSelected(CarouselAdapter<?> parent, View view,
                int position, long id) {



            switch(position){
            case 0:
                final View firstview;
                LayoutInflater inflater = (LayoutInflater)   getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
                firstview = inflater.inflate(R.layout.selected_item, null);
                break;
            case 1:
  • 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-30T23:48:46+00:00Added an answer on May 30, 2026 at 11:48 pm

    In case anyone else runs into this problem I solved it:

        LayoutInflater inflater = (LayoutInflater) CarouselActivity.this.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
                LinearLayout inflateView = (LinearLayout) findViewById( R.id.InflateParent );
                View nextView = null;
    
                switch(position){
                case 0:
                    System.out.println("Case 0");
                    inflateView.removeAllViews();
                    nextView = inflater.inflate( R.layout.nextview, null );
                    inflateView.addView(nextView);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have single php dynamic page that load image each time app user is
So here's my setup: User spins PickerWheel, chooses which section of the app to
I developed an iPhone app. User need to log in to update their credentials.
In my app,user can select image from gallery and after that he can zoom
Am developing an iPhone app. From my app user can to follow my twitter
Currently I have this code var App = Ember.Application.create(); App.user = Ember.Object.create({ people: customers
Context: multi-user app (node.js) - 1 painter, n clients Canvas size: 650x400 px (=
On my app a user may or may not have a profile. An example
in a J2EE app if user explicitly takes out the the ending page name
I'm developing web app that user can save his/her work to server. The data

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.