Josip Šokčević

aka Šokac

Android – small snippets

Author: Dejan Kober

Author: Dejan Kober

Android is an operating system that has the highest increase of users. Accoring to that, it is great platform for development. Android applications are made in Java, interpreted by Dalvik Virtual Machine. Today, there are over 300.000 applications for Android. You can learn more about programming on developers.android.com.

Here is a small list of Android snippets that can help you in the future.

 

Hide Title bar

Java code:
requestWindowFeature(Window.FEATURE_NO_TITLE);

This line of code needs to be before setContentView(R.layout.main);

Fullscreen application

Java code:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

This line of code, like Hiding Title bar, needs to be before setContentView(R.layout.main);. Also, you can add snippet for hiding Title bar

Fix orientation

In xml layout file, where is xmln:android

android:screenOrientation="portrait"

Fix crash while changing orientration (occured at progressDialog)

In AndroidManifest.xml, in tag activity add this atribute:

android:configChanges="keyboardHidden|orientation"

This list will be updated over time!

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

 

  • RSS
  • Delicious
  • Digg
  • Twitter
  • Linkedin

How to merge contact

From Android 2.0 contact data is laid out in three tables: Contacts, Data and RawContacts.  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

Android - small snip

Android is an operating system that has the highest increase of users. Accoring to that,  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

Novi poč... Doh, ne

Well, yes. This blog is no longer on Croatian language. There’s plenty of reason why,  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

Tehnofobija.com - no

Nakon drugo vremena razmišljanja, kolega Vedran Vučetić i ja osnovali smo blog o tehnologiji –  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

Zašto rootat Androi

Počela je invazija Android telefona te je broj korisnika drastično narastao. Većina ljudi su jako  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

How to merge contact

From Android 2.0 contact data is laid out in three tables: Contacts, Data and RawContacts.  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

Android - small snip

Android is an operating system that has the highest increase of users. Accoring to that,  [ Read More ]

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Blogplay
  • Google Bookmarks

Twitter updates

Switch to our mobile site