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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:51:15+00:00 2026-06-15T23:51:15+00:00

my code: public class CustomDialogFragment extends SherlockDialogFragment { /** The system calls this to

  • 0

my code:

 public class CustomDialogFragment extends SherlockDialogFragment {
            /** The system calls this to get the DialogFragment's layout, regardless
                of whether it's being displayed as a dialog or an embedded fragment. */
            @Override
            public View onCreateView(LayoutInflater inflater, ViewGroup container,
                    Bundle savedInstanceState) {
                View v = inflater.inflate(R.layout.p_product_gallery, container, false);
                ImageView tttiv=(ImageView)v.findViewById(R.id.test_image);
                tttiv.setImageResource(R.drawable.baozi);
                return v;
            }

            /** The system calls this only when creating the layout in a dialog. */
            @Override
            public Dialog onCreateDialog(Bundle savedInstanceState) {
                // The only reason you might override this method when using onCreateView() is
                // to modify any dialog characteristics. For example, the dialog includes a
                // title by default, but your custom layout might not need it. So here you can
                // remove the dialog title, but you must call the superclass to get the Dialog.
                mDialog = super.onCreateDialog(savedInstanceState);
                mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
                mDialog.getWindow().setBackgroundDrawable((new ColorDrawable(0x0f000000)));
                mPager = (ViewPager) mDialog.findViewById(R.id.aa_pager);
                mPager.setAdapter(mAdapter);            

                mAdapter = new ProductGalleryAdapter(getSupportFragmentManager());


                return mDialog;
            }
        }

The “mPager” always is null.
Can any one provide an example?
tkx!

  • 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-15T23:51:16+00:00Added an answer on June 15, 2026 at 11:51 pm

    Unless you are using Android 4.2 (and Android Support Library rev 11), fragments are not supported in fragments…

    Fragments within Fragments

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

Sidebar

Related Questions

I wrote this code: public class FileViewer extends JPanel implements ActionListener { /** *
This code: public class PhotoDescriptor { public DateTime DateCreatedUtc { get; set; } }
This code: public class MyActivity extends Activity { private final boolean logging = getResources().getBoolean(R.bool.logging);
So i have this code: public class StreamingMp3Player extends Activity implements OnClickListener, OnTouchListener, OnCompletionListener,
Code: public class SMH extends Activity { public void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.main);
My Code: public class Contact { public string id{ get; set; } public string
Try this piece of code - public class WhitespaceTest { public static void main(String[]
I have the next code : public class AddPrinter extends ListActivity { @Override public
Please consider the following code: public class Person ( public string FirstName {get; set;}
In the following code: public class A { public A():this(null){} public A(string b){/*code here*/}

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.