Archive for the 'Android' Category

Android Resource files

Sunday, August 26th, 2018

When developing an application for Android you will require additional resources. This data is kept in resource files. The resource files live under the /res directory and consist of the following items:

  • Colors
  • Strings
  • Dimensions
  • Drawables (Images and Icons)
  • Sounds
  • Videos
  • Data Files
  • Layout Files

The Rules for resource files are:

  • Must be lowercase
  • May contain: letters, numbers, underscores and periods
  • Filenames must be unique
  • XML Name attributes must be unique as well

To reference the resources from a compiled resource you would use something like the following format depending on the type of resource:

String app_name = getResources().getString(R.string.app_name);

The template for reading resources is either:
Local

@[resource type]:/[resource name]
or
Android
@android:[resource type]:[resource name]

or from a layout file:

@string/app_name

or from the android system resources:

@android:string/ok

Tags:

Android: SD card unmounting when I connect to the computer

Wednesday, January 12th, 2011

So I was charging my Droid X and noticed that while I was connected I could not use my SD card anymore. And the camera will not take any picutures if there is no SD card present.

So I pulled down the task bar and selected “USB connection” .

Once I selected the “Charge Only” option, it was smooth sailing and my SD card was available to my phone again.

This is also the place to turn on “USB Mass storage” when you are ready to copy off those pictures.

Tags:

Droid X first glance

Wednesday, January 5th, 2011

So I finally moved away from the iPhone(as it turned horrible when I used the “supported” update to iOs 4 on my 3g) and have gotten myself a Droid X. This phone has been awesome(and I have only had it for 2 days).

The Google driving directions app that comes with the phone has been awesome and the unified mailbox is pretty cool. The Android market has been nice and I have perused quite a few apps so far and have been very excited as to what is out there. I was a little afraid as I had heard some less then great things but am very happy to be misinformed.

I am still on the hunt for a good messaging app that supports popup messages (like the iPhone had) and also looking for a new expense receipt tracking app.

I will be following up with some useful information about using the Android OS as I have access to two of them in the house.

I am excited to have this new toy and looking forward to the things I can do with it.

Tags: , , ,