IdleSun's Weblog

June 18, 2010

Getting Android source in Ubuntu 10.04

Filed under: Android,Ubuntu — idlesun @ 8:38 pm

While I was following the Android instruction I ran into a couple of difficulties. So here is the list of them with how I resolved.

Forcing WUBI to install 32bit version.

I used Ubuntu Windows Installer (WUBI). It really simplified Windows-Ubuntu dual-boot setup. However, on my desktop it automatically choose 64bit Ubuntu without asking me. According to Android instruction 32-bit Ubuntu is preferred. So, I had to use command line option to install 32-bit Ubuntu using WUBI. From Windows command prompt, run

> wubi.exe --32bit

For more on WUBI: Wubi Guide.

Couldn’t find package git-core

Right after Ubuntu installation, if you follow Android instruction to install required packages then this error may occur. Then run this:

> sudo apt-get update

Couldn’t find package sun-java5-jdk

This will occur because Ubutu 10 comes with jdk 6. I followed the instruction on http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/.

Making sure PATH includes ~/bin

Once ~/bin is created, at home run:

> source .profile
> echo $PATH

Now, following Android instruction was good enough to finish the task.

Advertisements

June 5, 2010

How to hide Android status bar and title bar.

Filed under: Android — idlesun @ 12:26 am

I  looked for how-to. And found one that uses API: http://www.anddev.org/hide_statusbar-title_on_qvga_-_getting_screen_resolution-t2689.html. This solution is nice when app window style needs to be determined and set dynamically.

Later, I found an another way that uses style and much easier if app window style is fixed.  It is just adding the android:theme attribute to activity element in AdroidManifest.xml file:

<activity android:name=".HelloWorld" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

For more info, check the last part of http://developer.android.com/guide/topics/ui/themes.html and the Android Styles and Themes XML files.

Blog at WordPress.com.