Monday, August 13, 2012

Theming the ActionBarSherlock in Android


If you want to customize your ActionBarSherlock follow this steps:

1. Create in values folder a new file style.xml

2. In style.xml file determine your styles you want for ActionBarSherlock e.g. :
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="Theme.Styled" parent="Theme.Sherlock.Light.DarkActionBar">
    <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
    <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>

<style name="Widget.Styled.ActionBar" parent="Widget.Sherlock.Light.ActionBar.Solid.Inverse">
    <item name="background">@drawable/bgraund</item>
    <!-- <item name="android:background">@drawable/top_bar</item> -->
    <item name="backgroundSplit">@drawable/bgraund</item>
    <item name="android:background">@drawable/bgraund</item>
</style>
</resources>


3. In your AndroidManifest.xml determine this your custom style that you just created in style.xml:
<application android:icon="@drawable/adsurfer_icon" 
        android:label="@string/app_name"
        android:debuggable="true"
        android:name=".app.AdsurferApplication"
        android:theme="@style/Theme.Styled" >


I've found helpful info on this topic in this article:

Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties

In order to fix this error:

1. Go to the Properties for your project (double click on your project), then find out Adroid Tools/Project Properties (see screenshot)


2. Then change Compile Compiance level to the higher level e.g 1.5 or 1.6 (That is it :) )



Saturday, August 11, 2012

What is better Youtube or Vimeo

As I've understood from this article http://webtrends.about.com/od/profiles/a/Vimeo-Vs-Youtube-Video-Sharing-Sites.htm Youtube is still convenient for majority of my needs :) But if I have to publish some creative movie/clip I would prefer Vimeo.

How to open a file in command line on Mac OSX Terminal application

If you want to open some file/application do this in Terminal cli:

MBPro-2:tools apple$ open android

where "open" is the command in command line
and "android" is some application (in this case I use android application from Android SDK/tool)

For full reference of command for Terminal in Mac OSX see check this link.

How to change the icon of application on Android

If you have to change the icon of your application for Android mobile phone do this:

Edit AndroidManifest.xml file:


<application android:icon="@drawable/ic_launcher" android:label="@string/app_name"

In this example "ic_launcher" is the name of the image of your icon (don't add here its extension e.g. ".png").

For more details refer this link or this link if you want to see how to create your own icon for the app.

Thursday, August 9, 2012

How to Stop Jenkins on Mac OSX localhost

If you need to stop Jenkins on your Mac OSX do execute this command in your Terminal:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

If in case you want to again have your jenkins started.. just use the reverse of the above

sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist


See more references on this topic here.

Tuesday, July 31, 2012

How to Change MAC address on Mac OSX

If you want to change the MAC address of your Mac do this in Terminal:

1. Check the current MAC address of your Mac:
ifconfig en0 |grep ether

2. Generate new random MAC address:
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'


3. Change MAC address of your Mac:
sudo ifconfig en0 ether d4:33:a3:ed:f2:12 (it is just example)


4. Check the changes:
ifconfig en0 |grep ether