Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

EffectHub.com: Your Best Source for Gaming
Login    or

a SlidingMenu lib like facebook and gmail

package com.example.androidtest;import android.annotation.SuppressLint;import android.app.FragmentTransaction;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;import com.example.fragment.ContentFragment;import com.example.fragment.MenuFragment;import com.slidingmenu.lib.SlidingMenu;import com.slidingmenu.lib.app.SlidingActivity;@SuppressLint("NewApi")public class MainActivity extends SlidingActivity {	public FragmentTransaction fraTra = null;	public MenuFragment menuFra = null;	public ContentFragment contentFra = null;	@Override	public void onCreate(Bundle savedInstanceState) {		super.onCreate(savedInstanceState);		setContentView(R.layout.activity_main);		setBehindContentView(R.layout.menu_layout); // 设置菜单页		fraTra = this.getFragmentManager().beginTransaction();		menuFra = new MenuFragment(this);		contentFra = new ContentFragment("I'm John");		fraTra.replace(R.id.menu_fl, menuFra);		fraTra.replace(R.id.main_rl, contentFra);		fraTra.commit();		//		SlidingMenu sm = getSlidingMenu();	//滑动菜单 		sm.setShadowWidth(15); // 阴影宽度		sm.setBehindOffset(300); // 菜单与边框的距离		sm.setShadowDrawable(R.drawable.shadow); // 滑动菜单渐变		 sm.setFadeDegree(0.35f);				//色度		sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN); // 边缘滑动菜单		//		getActionBar().setDisplayHomeAsUpEnabled(true);	//ActionBar(左上角)是否可以点击	}	@Override	public boolean onCreateOptionsMenu(Menu menu) {		// Inflate the menu; this adds items to the action bar if it is present.		getMenuInflater().inflate(R.menu.activity_main, menu);		return true;	}	@Override	public boolean onOptionsItemSelected(MenuItem item) {		switch (item.getItemId()) {		case android.R.id.home:			//判断是菜单打开还是关闭			toggle();			return true;		}		return super.onOptionsItemSelected(item);	}}


https://github.com/jfeinstein10/SlidingMenu

...

You must Sign up as a member of Effecthub to view the content.

2630 views    1 comments

You must Sign up as a member of Effecthub to join the conversation.

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: views/footer.php

Line Number: 6

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 21

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 85