Skip to main content

Posts

Showing posts from 2015

getFragmentManager = null when using 'fragment' tag in Android layout file

I was using 'fragment' tag in the layout file for the Android app I was developing, as shown in the first code block. The id of the layout file for the CalendarFragment (.java) is R.id.calendar. I want to get the CalendarFragment instance in my code at runtime using getFragmentMeneger.findFragmentById(R.id.calendar) but kept getting null result. I ended up using getFragmentMeneger.findFragmentById(R.id.left1), the id for the 'fragment' tag in the main layout file to get the CalendarFragment at run time and it works. 'fragment' tag in the layout file for MainActivity.java: Actual layout file for the CalendarFragment.java: Actual java code in MainActivity.java to access the fragment:

Install Maynard Desktop Shell on Raspberry Pi

There is a light-weight desktop environment, Maynard, for Raspberry Pi. Here are the steps to install and start using it. wget http://raspberrypi.collabora.co.uk/setup-maynard.sh chmod 755 setup-maynard.sh ./setup-maynard.sh // reboot // login maynard // enjoy Reference: http://raspberrypi.collabora.co.uk/maynard.html