Senin, 24 Februari 2014

How to set transparent background for image button, text edit, etc on android project.

When you want to change layout like that, somepeople add some code on file.java, but I have simple trick to change background of image button or EditText to transparant, it easy...you can add it's code android:background="#00ffffff" to your file.xml example:

Before:
<EditText
        android:id="@+id/I1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_x="1dp"
        android:layout_y="86dp"
        android:ems="10"
        android:gravity="center"
        android:hint="Input First Number"
        android:numeric="integer"
        android:textColorHint="#FAFAD2"
        android:textColor="#FAFAD2" />

After:
<EditText
        android:id="@+id/I1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_x="1dp"
        android:layout_y="86dp"
        android:background="#00ffffff"

        android:ems="10"
        android:gravity="center"
        android:hint="Input First Number"
        android:numeric="integer"
        android:textColorHint="#FAFAD2"
        android:textColor="#FAFAD2" />

save and run your project, and see the magic :D
okay...#keep coding, and be a programmer....

Rabu, 12 Februari 2014

How To Change CPU Cores on LINUX

 Multicore Processor

 

 

Opinion:

Some choose to use a single core or one processor core reasons:
• Computer only used for lightweight applications such as Internet browsing, office applications
• 1 core processors more power efficient.
• Single core is enough for me at this time.
- See more at: http://etutorialkomputer.blogspot.com/2011/02/fungsi-multicore-processor.html#sthash.0VwVLjXk.dpuf
I got it on other blog :)

Some people choose to use a single core:

• Computer only used for lightweight applications such as Internet browsing, office applications.
• 1 core processors more power efficient.
• Single core is enough.

Some people choose to use a dual core:

• dual core processor is more intensive for gaming applications.
• Speed ​​is not much different dual core quad cores for specific applications.
• Got a dual core processor speed better at the same price of a quad core.
• Power is more efficient than quad core.

hmmm... I also chose dualcore because, I think is helpful me,  for improving performance of the emulator. when I run to try a app of android have I created.
and how to change it, yeaah like that...

Method 1:
This method is dynamic and doesn’t require a reboot. You can just open a terminal and try this out:
  • sudo sh -c "echo 0 > /sys/devices/system/cpu7/online"
    sudo sh -c "echo 0 > /sys/devices/system/cpu6/online"
    Repeat the above steps for cpu2 to cpu7 and it’ll leave you with cpu0 and cpu1 active which is essentially what we’re trying to achieve.
Method 2:
I like it and working to me....This method will make the linux boot with 2 cores which might make kernel more optimized for dual core environment than the method above.


  • Add maxcpus=2 to GRUB command line by doing the following:
    gksu gedit /etc/default/grub
    Find:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    and change it to
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash maxcpus=2"
  • Then run:
    sudo update-grub
    When you reboot, linux will run on 2 cores.

    ok...see u next time, #keep coding programmer...
Some choose to use a single core or one processor core reasons:
• Computer only used for lightweight applications such as Internet browsing, office applications
• 1 core processors more power efficient.
• Single core is enough for me at this time.
- See more at: http://etutorialkomputer.blogspot.com/2011/02/fungsi-multicore-processor.html#sthash.0VwVLjXk.dpuf
Multicore Processor

Multicore Proce

Multicore Processor
Multicore Processor

Selasa, 04 Februari 2014

Can't launch emulator AVD in eclipse cause No Target Selected

Today, i'm coding on my eclipse workspace but something wrong because when i'm create android emulator 4.1 in AVD isn't working, i'm confusing about this, i see a error message "No Target Selected" i have changed target but no effect. But finally i can solved it ^_^ ok check this out...



when you have a problem same with me, because of "You don't install CPU System Images. for example: ARM EABI v7a System Image" and then i installing a cpu system image on sdk manager. I'm click the icon Android SDK manager on toolbar and i go to Android 4.1.2 API Level 16 and i checklist a cpu system image for download and installing it.


and finally, i can to create a android emulator 4.1 :D don't you believe me? let's try it's your home and see the magic :v ckckck.... i hope this can help you to solve your problems #keep coding programmer ;)