File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ public void onCreate(Bundle savedInstanceState) {
31
31
// register a new content view
32
32
mContentView = new RelativeLayout (mActivity );
33
33
mContentView .setId (android .R .id .content );
34
+
35
+ // customize based on type of Activity
36
+ if (mActivity instanceof SlidingListActivity ) {
37
+ ListView lv = new ListView (mActivity );
38
+ lv .setId (android .R .id .list );
39
+ mContentView .addView (lv );
40
+ }
41
+
34
42
// set up the SlidingMenu
35
43
mSlidingMenu = (SlidingMenu ) LayoutInflater .from (mActivity ).inflate (R .layout .slidingmenumain , null );
36
44
mSlidingMenu .setViewAbove (mContentView );
Original file line number Diff line number Diff line change @@ -17,10 +17,6 @@ public void onCreate(Bundle savedInstanceState) {
17
17
super .onCreate (savedInstanceState );
18
18
mHelper = new SlidingActivityHelper (this );
19
19
mHelper .onCreate (savedInstanceState );
20
- // we need to create the default ListView
21
- ListView lv = new ListView (this );
22
- lv .setId (android .R .id .list );
23
- mHelper .setContentView (lv , null );
24
20
}
25
21
26
22
public void onPostCreate (Bundle savedInstanceState ) {
You can’t perform that action at this time.
0 commit comments