Friday, 15 March 2013

android - Using Custom List on SlidingMenu -


I'm trying to implement widgets Koush within SlidingMenu a jfeinstein10, but I can figure it out How are you doing it or if your achievable

I have both working, I can add widgets in any activity and also got a slidingmenu with a different XML.

Using the example code as a base basis

Thanks for the help.

Well, I think using examples of sliding instances the use of frames have some of the Web another example is my piece class, where I'll use Koush widgets

  @SuppressLint ( "ValidFragment") public class MyListFragment extends BetterListFragment {@Override protected void OnCreate (Bundle savedInstanceState, views) {super .onCreate (see SavedInstanceState, see); AddItem ("test", new list (getInternal (), r string. Hello_world, 0, r.drawable.ic_launcher)); }}   

This is my base activity where I would build sliding menu

  public class BaseActivity extends SlidingFragmentActivity {protected BetterListFragment mFrag; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); // Set Set Set Backhandcontentview (R.Let.Menu_Frame); If (Saved InstantState == blank) {Fragment Transaction T = this.getSupportFragmentManager (). BeginTransaction (); MFrag = New MyListFragment (); T. Replay (R.Id.Menu_Frame, M.Frag); T.commit (); .} Else {Mfrag = (Maylistfragment) Thiskgetsupportfragmentmnagr () Findfregmentbyid (Rkidkmenu_frem); } // Slider Menu Customize the sliding menu suite = Slipping menu (); Sm.setShadowWidthRes (R.dimen.shadow_width); Sm.setShadowDrawable (R.drawable.shadow); Sm.setBehindOffsetRes (R.dimen.slidingmenu_offset); Sm.setFadeDegree (0.35f); Sm.setBehindWidth (250); Sm.setTouchModeAbove (SlidingMenu.TOUCHMODE_FULLSCREEN); SetSlidingActionBarEnabled (false); }}   

And this is my main activity

  the public class extends MainActivity BaseActivity {@Override Public Zero OnCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState ); SetContentView (R.layout.activity_main); }}   

Hope it will help someone else :)

No comments:

Post a Comment