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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:07:13+00:00 2026-06-08T03:07:13+00:00

i need to cooperate with IOS developer. He does not know how Android work

  • 0

i need to cooperate with IOS developer. He does not know how Android work in layout system. He design a very dynamics UI. Please see my link.

[Link:] http://dl.dropbox.com/u/78582670/layoutdesign.png

Remarks: Orange rectangle mean image buttons.

In this layout, there exist two main views. For View 1, it is a list view. When clicking a item, a View 2 will animate. View 2 move from right to left. Also, it cover the View 1 a bit. After this translation finish, the orange Rect also animate. They move from bottom to the relative position.

I talk to them. If i do that design, the layout cannot be reused. Secondly, i don’t want to hard code for playing animation and the UI design.

They think everything is possible and easy to do = =|||.

If you are me, how do you design it?

Here is my solution, but View 2 cannot cover View 1.

public class EducationSystemActivity extends Activity 
{
ImageButton mButton1 = null;
ImageButton mButton2 = null;
ImageButton mButton3 = null;
ImageButton mButton4 = null;
ImageButton mButton5 = null;

OnClickListener mImageButtonClickListner = new OnClickListener()
{
    @Override
    public void onClick(View v) 
    {
        switch(v.getId()){
            case R.id.imageButton1:{
                Fragment fragment = new TestFragment2();
                FragmentTransaction ft = getFragmentManager().beginTransaction();
                ft.setCustomAnimations(R.animator.fragment_slide_left_enter,
                        R.animator.fragment_slide_left_exit,
                        R.animator.fragment_slide_right_enter,
                        R.animator.fragment_slide_right_exit);
                ft.replace(R.id.fragment_content, fragment);
                ft.addToBackStack(null);
                ft.commit();
                Toast.makeText(EducationSystemActivity.this, "Button1", Toast.LENGTH_SHORT).show();
                break;
            }
            case R.id.imageButton2:{
                Toast.makeText(EducationSystemActivity.this, "Button2", Toast.LENGTH_SHORT).show();
                break;
            }
            case R.id.imageButton3:{
                Toast.makeText(EducationSystemActivity.this, "Button3", Toast.LENGTH_SHORT).show();
                break;
            }
            case R.id.imageButton4:{
                Toast.makeText(EducationSystemActivity.this, "Button4", Toast.LENGTH_SHORT).show();
                break;
            }
            case R.id.imageButton5:{
                Toast.makeText(EducationSystemActivity.this, "Button5", Toast.LENGTH_SHORT).show();
                break;
            }
        }
    }
};


@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menu);

    mButton1 = (ImageButton) findViewById(R.id.imageButton1);
    mButton2 = (ImageButton) findViewById(R.id.imageButton2);
    mButton3 = (ImageButton) findViewById(R.id.imageButton3);
    mButton4 = (ImageButton) findViewById(R.id.imageButton4);
    mButton5 = (ImageButton) findViewById(R.id.imageButton5);

    mButton1.setOnClickListener(mImageButtonClickListner);
    mButton2.setOnClickListener(mImageButtonClickListner);
    mButton3.setOnClickListener(mImageButtonClickListner);
    mButton4.setOnClickListener(mImageButtonClickListner);
    mButton5.setOnClickListener(mImageButtonClickListner);


    FragmentTransaction ft = getFragmentManager().beginTransaction();
    ft.replace(R.id.fragment_content, new TestFragment1());
    ft.commit();

}

}

TestFragment2:

public class TestFragment2 extends Fragment
{
LayoutInflater mInflater = null;

@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    mInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    Log.d("TestFragment1", "onCreateView");
    return inflater.inflate(R.layout.test_fragment2, container, false);
}

@Override
public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) {
    Log.d("TestFragment2", "onCreateAnimator transit:" + transit + " enter:" + enter + " nextAnim:" + nextAnim);
    Animator set = null;
    if(enter){
        set = AnimatorInflater.loadAnimator(this.getActivity(), R.animator.fragment_slide_left_enter);
        set.addListener(new AnimatorListener()
        {

            @Override
            public void onAnimationCancel(Animator animation) 
            {

            }

            @Override
            public void onAnimationEnd(Animator animation) 
            {
                Log.d("TestFragment2", "onAnimationEnd()");
                addAnimationSubMenu();
            }

            @Override
            public void onAnimationRepeat(Animator animation) 
            {

            }

            @Override
            public void onAnimationStart(Animator animation) 
            {
                Log.d("TestFragment2", "onAnimationStart()");
            }

        });
    }
    else{
        set = AnimatorInflater.loadAnimator(this.getActivity(), R.animator.fragment_slide_left_exit);
    }
    return set; 
}


private void addAnimationSubMenu()
{
    ViewGroup submenu_frame = (ViewGroup) getActivity().findViewById(R.id.submenu_frame);
    mInflater.inflate(R.layout.fragment1_submenu, submenu_frame, true);
    View submenu_layout = getActivity().findViewById(R.id.submenu_layout);
    Animation anim = AnimationUtils.loadAnimation(this.getActivity(), R.anim.slide_bottom_to_top);
    submenu_layout.startAnimation(anim);
}
}

testfragment2.xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFEFE00"
android:padding="0dp"
android:layout_margin="0dp"
android:orientation="horizontal" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_weight="0.5"
    android:text="@string/test2" />

<FrameLayout
    android:id="@+id/submenu_frame"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:background="@drawable/menu_drawable">
</FrameLayout>

</LinearLayout>

fragment_submenu1.xml:

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

<ImageButton
    android:id="@+id/imageButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/menu_item1"
    android:src="@drawable/speech_bubble2x" />

<ImageButton
    android:id="@+id/imageButton2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/menu_item2"
    android:src="@drawable/newspaper2x" />

<ImageButton
    android:id="@+id/imageButton3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/menu_item3"
    android:src="@drawable/trolley2x" />

<ImageButton
    android:id="@+id/imageButton4"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/menu_item4"
    android:src="@drawable/refresh2x" />

<ImageButton
    android:id="@+id/imageButton5"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/menu_item5"
    android:src="@drawable/house2x" />

</LinearLayout>
  • 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-08T03:07:15+00:00Added an answer on June 8, 2026 at 3:07 am

    This is Possible you have to use fragments use http://actionbarsherlock.com/ this library will help you to get your requirement and http://xrigau.wordpress.com/2012/03/15/using-an-actionbar-in-your-application-with-actionbarsherlock/ this tutorial will help you to implement the library.

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

Sidebar

Related Questions

I am new to android.so cooperate with me. I need to parse the json
I need some help is MS SQL Server Query. I’m not much of a
For work, I need to get our site working in IE7. Because, as we
The company I work for is creating an iOS app that will be skinned
I have an LCDS server sitting behind a corporate proxy/firewall. I need to use
Need to apply a filter to a file like this: TUPAC_0006:1:1:2554:2356#0/1 0 * 0
Need a map reduce function by mongo in php This my mongo structure [_id]
Need some regular expressions help. So far I have my code working to allow
Need help, function getFamily() { FB.api('/me/family', function(response) { alert(JSON.stringify(response)); }); } With the above
Need just a push in the right direction with this. I'm building a multi-language

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.