Mar
09
2010
0

Show your Android pride with a Google Chrome Skin


Here’s a nice download for all you android enthusiasts running Google Chrome. Developer Roman Nurik has developed an unoffical Android Google Chrome theme called Robot Theme, inspired by Android. This skin gives your chrome browser a green border with digital circuitry etched in the background. Curious? Here are a few screenshots, because we all know that a picture is worth 32,000 bits (geek points to everyone who got that joke).

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Sphere: Related Content

Written by Maliek Mcknight in: News |
Mar
07
2010
7

Testers Wanted

So in case you haven’t noticed Droidweb has gone on a sort of hiatus.  I’ve been busy between school, programming, saving the world, and other things.  But no fear;  the wait will be worth it.

One of the projects is an android program I’ve been working on for a little while now.  While I’ll wait until its out of testing phase to release full details, just know its a helper application for the Android market.  Which brings me to the matter at hand.  I need testers; preferably those with a wide variety of Android devices.  If you’re interested in testing a new Android application, just leave your name / email in a comment!

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Sphere: Related Content

Written by Maliek Mcknight in: News |
Feb
10
2010
0

Developer Tip #10: Passing Data Between Activities via Bundles

This might be one of things you do most often in Android programming.  Say you have a nice activity that functions well.  You want to program a second activity that runs after the first, but uses data gathered by the first.  How do you do this?

Have no fear!  Bundles are here.  Bundles are controlled hashmaps that allow you to pass smalll quantized chunks of data between activities.  To check out how they work, check out the following scenario:

I have some data in the form of stings, ints, etc that I want to pass between Activity1 and Activity2.   How do I do this?

Simple.  Create a bundle, populate the data into the bundle (using the handy dandy put() function).  Attach the bundle to the intent you’re firing.  Fire said intent and retrieve the values on the other side.

Here’s some code to illustrate this concept:

//Create the intent
Intent i = new Intent(NameOfThisFile.this, NameofSecondJavaFile.class);

//Create the bundle
Bundle bundle = new Bundle();

//Add your stuff
bundle.putString(“stuff”, “foo”);
bundle.putString(“morestuff”,”foo2”);
bundle.putInt(“yourMomsAge”, 83);

//Add the bundle to the intent
i.putExtras(bundle);

//Fire that second activity
startActivity(i);

Now in your second activity retrieve your goodies:

//Get the bundle
Bundle bundle = getIntent().getExtras();

//Extract the data like legs from a turducken…
String stuff = bundle.getString(“stuff”); //puts foo in stuff
int myMomsAge = bundle.getInt(“yourMomsAge”);

Hope this helps.  This method can also be used to return information once an activity closes, but more about that later, along with program flow.

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Sphere: Related Content

Written by Maliek Mcknight in: programming |
Jan
08
2010
0

AudioManager Widget for Android

Every once in while there is an application that makes your life a lot easier.  Sometimes that application is a widget.  Such is the case with AudioManager for Android.  This widget does what it name implies; it allows you to manage your android device’s various audio levels.  This includes the alarm level, media level, ringer volume, and much more.

The application sits neatly on one of your homescreens  It takes up a 1×4 block of space on the screen and looks good with vibrant colors.  These colors do much more than just look good: they are functional, informing you of the volume levels in the categories of:

  • Alarm
  • Music
  • Alerts
  • Ringer
  • System
  • Voice

Homepage

Clicking on the widget will fire the console window.  From here you can use sliders to set the volume levels for the alarm, medial player, alerts, ringer, system, and calls.

console

And that’s about it for the program.  Its simple, yet effective.  And in Android that usually makes for the best applications.  Get AudioManager from the Android market by searching it or scanning the QR code below:

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Sphere: Related Content

Written by Maliek Mcknight in: Application Reviews | Tags: , , , , ,
Jan
06
2010
0

Starting Android Development Part 3: Layout Tutorial 2

As promised, here’s part two of my coverage on layouts in Android.  Lets pick up where we left off, namely we just created a main.xml file for layout of our temperature conversion application.

So you know what we’re trying to achieve here, here’s a screenshot of the final product.

temp_screen_final

I know what you’re thinking.  That’s not that cute of a layout.  I’ll leave the job of making really pretty layouts to you after you learn the basics.  For now this layout will do to show you how making layouts in Android works.

This layout consists of a TableLayout (A Linear Layout could have done here as well).  Each table row has other items embedded in it.  One row even has a TableLayout embedded within it (just to show that you can do this).  This is a valid layout, but is generally frowned upon, as embedding table layouts within table layouts can lead to slower UI performance in the long run.

Here’s the code for the layout:

<?xml version="1.0" encoding="utf-8"?>
<TableLayout
android:id="@+id/widget45"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<TextView
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ff0000ff"
android:padding="10px"
android:text="Temperature Conversion App"
android:textSize="18px"
android:typeface="sans"
android:textStyle="bold"
>
</TextView>
<TableLayout
android:id="@+id/widget62"
android:layout_width="319px"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TableRow
android:id="@+id/widget63"
android:layout_width="149px"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<EditText
android:id="@+id/User_input_F"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text=" "
>
</EditText>
<TextView
android:id="@+id/widget78"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(ºF)"
>
</TextView>
</TableRow>
<TableRow
android:id="@+id/widget64"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<EditText
android:id="@+id/User_input_C"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text=" "
>
</EditText>
<TextView
android:id="@+id/widget79"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(ºC)"
>
</TextView>
</TableRow>
<TableRow
android:id="@+id/widget65"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<EditText
android:id="@+id/widget83"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text=" "
>
</EditText>
<TextView
android:id="@+id/User_input_K"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(ºK)"
>
</TextView>
</TableRow>
</TableLayout>
<TableRow
android:id="@+id/Conversion"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:id="@+id/conversion"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Convert to:"
>
</TextView>
<RadioGroup
android:id="@+id/widget144"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<RadioButton
android:id="@+id/F_Select"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Fareinheit"
>
</RadioButton>
<RadioButton
android:id="@+id/C_Select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Celcius"
>
</RadioButton>
<RadioButton
android:id="@+id/K_Select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kelvin"
>
</RadioButton>
</RadioGroup>
</TableRow>
<TableRow
android:id="@+id/widget84"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/Calculate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Calculate"
>
</Button>
</TableRow>
</TableLayout>

Note how each element has an id attribute (android:id) and the value of that attribute starts with “@+id/name“@+id/” identifies the name by which you can refer to this layout element later in your java programming.  Other things to note include:

  • android:layout_width and android:layout_height: Use these to determine how much space an element is going to take up.  These can have two values: wrap_content and fill_parent.  Wrap content means the element will only be as large as it needs to be to display its content.  Fill_parent means the element will fill all available space it can, as determined by the parent element it resides in
  • To find the attribute applicable to a given layout, check out that layouts documentation at the developer.android.com/reference website.  E.g. the API site for TableLayout is
    http://developer.android.com/reference/android/widget/TableLayout.html. I usually find the page i need by just searching “android layout” and the name of the element I’m using

In the next post of this series I will discuss some common Android layout elements, what they look like, and some of the attributes associated with that element.  Then it’ll be time to connect our layout (frontend) to the logic that makes it work (the backend).  For now check out the code I provided, try to understand how it works, and practice creating your own Android layouts!

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Sphere: Related Content

Powered by WordPress. Theme: TheBuckmaker. Kredit trotz Schufa, Energetisierung

Technology blogs