p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Android 4 Application Development (http://p2p.wrox.com/forumdisplay.php?f=674)
-   -   All Fragment Activities (http://p2p.wrox.com/showthread.php?t=89509)

studmuddin March 7th, 2013 10:37 PM

All Fragment Activities
 
I have tried both writing the code out of the book and importing it. There are no errors, though when i run the activity the display is empty. I run the debugger and in the "Activity Thread" it highlights:

if (list == null) {

Out of:

public void registerOnActivityPausedListener(Activity activity,
OnActivityPausedListener listener) {
synchronized (mOnPauseListeners) {
ArrayList<OnActivityPausedListener> list = mOnPauseListeners.get(activity);
if (list == null) {
list = new ArrayList<OnActivityPausedListener>();
mOnPauseListeners.put(activity, list);
}
list.add(listener);
}
}


Please help. None of the fragments activities are working.

corllja June 6th, 2013 09:38 PM

Any resolution to this problem?
 
I'm currently working through this book and also have problems with the Fragments code. There are no errors, but I noticed LinearLayout is highlighted in the main.xml file. With a message "set android:baselineAligned="false" for better performance.
I'm new to Android. Would a RelativeLayout for this particular exercise? I don't really know the difference...


All times are GMT -4. The time now is 12:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.