I am able to make the slider by using this code. But I dont know how to make it in 3D.
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ImageButton;
import com.navdrawer.SimpleSideDrawer;
public class MainScreen extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main_screen);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment()).commit();
}
}
/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment implements
OnClickListener {
private ImageButton _Menu;
private SimpleSideDrawer slide_me;
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main_screen,
container, false);
slide_me = new SimpleSideDrawer(getActivity());
slide_me.setLeftBehindContentView(R.layout.slider_menu_inflator);
_Menu = (ImageButton) rootView.findViewById(R.id.menu);
_Menu.setOnClickListener(this);
return rootView;
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.menu:
slide_me.toggleLeftDrawer();
break;
default:
break;
}
}
}
}