Monthly Archives: April 2013

[android] Full-screen mode on ICS and above not working on 2.3

That is when you got error like :

java.lang.NoSuchMethodError: android.view.View.setSystemUiVisibility

when you try to hide the task bar on your system with “


And here is how I fixed it:

if(SDK_INT >= 11 && SDK_INT < 14) {
}else if(SDK_INT >= 14){


Or you can find the well-formated snippet here:





[android] Setting up project with Sliding Menu — got some errors

1/ For the error

“The method getSupportActionBar() is undefined for the type BaseActivity”

Inside the SlidingMenu library, edit the class SlidingFragmentActivity to extend SherlockFragmentActivity (like below). Then clean and rebuild, this method should now be found.

public class SlidingFragmentActivity extends SherlockFragmentActivity implements SlidingActivityBase {


[Ubuntu] How to share internet connection in Ubuntu 12.x with another ubuntu client.

For an Ubuntu client, you probably only need to add DNS servers.

  • Right click on your network configuration applet in your tool bar and select Edit Connections.
  • Select your network adapter and click Edit.
  • Click on IPv4 Settings, and change the method to Automatic (DHCP) Addresses only.
  • Then either add your ISP DNS servers, or you can use OpenDNS ->

[Android] Solving problem when setup ActionBarSherlock libs and sample project.

The hierarchy of the type ‘Class name’ is inconsistent

My Eclipse, together with Android SDK has settings for java compiler:

– Compiler compliance level : 1.6  ( Ubuntu + openjdk) ( Window –> Pref –> Java –> Compiler)

when import ActionBarSherlock project, I must change it back to this compliance level.
–> Enable Project Specific Setting.
–> Set Compiler Compliance level of this project to be 1.6

Done !

Clear and rebuild project.