Text Size
Tuesday, July 29, 2014

IOS and LAMP Web Developer Blog by Mike Zriel

Java Android

Java Android

Last Updated on Wednesday, 23 July 2014 07:36

How to create a custom button in Android

BY: Mike Zriel

To create an custom button in Android create a subfolder called drawable in the res directory.

Then create an xml file save is as custom_button.xml or what ever you chose to name it.

below is content for your custom button

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" 
    android:typeface="monospace">

    <solid android:color="#00ff00" />

    <corners
        android:bottomLeftRadius="7dp"
        android:bottomRightRadius="7dp"
        android:topLeftRadius="7dp"
        android:topRightRadius="7dp" />
    <stroke
        android:width="1dp"
        android:color="#ff0000" />

</shape>

solid sets the hex color of the button, corners set the corner radius ( rounded corders ), stroke set a border color for the button.

 
Java Android

Java Android

Test vibration on Samsung Galaxy S

BY: Mike Zriel

Open the Telephone App and dial this number:

*#0842#

STAR HASH ZERO EIGHT FOUR TWO HASH

A magic hidden menu shows up with Options to for: ON , OFF, 1 sec on/off, 2 sec on/off

 
Java Android

Java Android

Last Updated on Tuesday, 08 July 2014 10:58

How to use Android Samsung Galaxy S for developement

BY: Mike Zriel

To use an Android device for development so it appears in the DDMS, you need to turn to Activate USB Debugging.

The following are instructions how to do this on a Samsung Galaxy S, which I am using as a test phone.

  • Press the Menu Button
  • Settings
  • Applications
  • Development
  • Press on the checkbox for USB debugging ** you must unplug the phone from USB when you do this **
  • Plug the USB back into the phone and if all goes well, you should see your device listed in DDMS in Eclipse

Side note: to see DDMS in Eclipse, Click "Window" -> "Open Prospective" -> "Other" -> "DDMS"

 
Copyright © 2014 by Mike Zriel - Zriel.com