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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:47:18+00:00 2026-05-27T08:47:18+00:00

I am using actionbarsherlock library to have action-bar in my application, I am also

  • 0

I am using actionbarsherlock library to have action-bar in my application,

I am also using view-pager to switch between the page,

Now the problem is i want only one tab with two fragment to display data regarding each other.

What could be the possible way to do this?

I have been going through like the one below but unsuccessful

In main fragment i am inflating a xml like this

<code>
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        View fragView = inflater.inflate(R.layout.album_view_main, container, false);

        return fragView;
    }
</code>

xml fie is look like this

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

    <fragment
        android:id="@+id/fragment_album_view"
        android:layout_width="0px"
        android:layout_height="fill_parent"
        android:layout_weight="3"
        class="com.nix.music.activity.fragments.AlbumFragMent" />

    <FrameLayout
        android:id="@+id/frame_list_song"
        android:layout_width="0px"
        android:layout_height="fill_parent"
        android:layout_weight="2" >
    </FrameLayout>
</LinearLayout>
</code>

but the problem is i cannot find “frame_list_song” in AlbumFragment class it appears null

what could be the way around ?

thank you

  • 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-27T08:47:19+00:00Added an answer on May 27, 2026 at 8:47 am

    This layout should be set in the parent activity using setContentView(). Then, you would be able to do something like getActivity().findViewById(R.id.frame_list_song) from your AlbumFragment. The better way would be to use an interface and transfer control to the main activity, and not access other fragments directly.

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

Sidebar

Related Questions

I'm using ActionBarSherlock and have a little problem. In the Fragment Tabs example, there
I am using ActionBarSherlock Library. In a simple layout i have this code: <?xml
I'm developing a Android application, using the ActionBarSherlock library. In one activity, I use
I am using ActionBarSherlock to implement action bar on my Android 2.1 API 7
I'm using Christophe Versiuex's HoloEverywhere library in concert with ActionBarSherlock to display an ICS
I am using ActionBarSherlock and have implemented ShareActionProvider . When a user selects an
I'm developping an application using ActionBarSherlock component. My goal is to target all devices
I'm using Android Support Library (v4) and ActionBarSherlock. I'm trying to close a progress
I'm adding navigation tabs to an action bar using the sample code provided here:
I have a question regarding the concept of contextual action bar. The Android Design

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.