<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4333515732090309068</id><updated>2011-07-08T05:55:58.975+07:00</updated><category term='onDraw'/><category term='Unix'/><category term='Android'/><category term='C'/><title type='text'>Pichayas, Android, C, C++, Java, J2ME, J2EE, Spring</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-8943573915446430248</id><published>2009-12-13T22:09:00.001+07:00</published><updated>2009-12-13T22:09:50.943+07:00</updated><title type='text'>Code highlighting on blogger</title><summary type='text'>http://cubicware.blogspot.com/2009/01/code-highlighting-on-blogger.html</summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/8943573915446430248/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/12/code-highlighting-on-blogger.html#comment-form' title='34 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/8943573915446430248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/8943573915446430248'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/12/code-highlighting-on-blogger.html' title='Code highlighting on blogger'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>34</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-7388988627582445635</id><published>2009-07-22T20:35:00.004+07:00</published><updated>2009-11-24T11:21:56.374+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Techniques for Saving Data</title><summary type='text'>❑ Shared Preferences เป็นข้อมูลแบบ key/value เอาไว้เก็บ  UI state, user preferences หรือ application settings

❑ Files เก็บลองไฟล์โดยตรง Android อนุญาติให้คุณสร้าง และโหลดไฟล์ทั้งจากในเครื่อง และการ์ด

❑ SQLite Databases ถ้าต้องการการจัดการที่สูงขึ้น structured data น่าจะดีที่สุด, Android มี library ของ SQLite relational database. ทุก ๆ application สามารถสร้าง databases ของตัวเองได้ </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/7388988627582445635/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-techniques-for-saving-data.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/7388988627582445635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/7388988627582445635'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-techniques-for-saving-data.html' title='Android Techniques for Saving Data'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-114763114407029288</id><published>2009-07-17T09:50:00.004+07:00</published><updated>2009-07-22T20:42:20.675+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='onDraw'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>TIP on Android Development</title><summary type='text'>เทคนิคที่สำคัญที่สุดอันหนึ่งของการเขียนโปรแกรมบน Android คือการหลีกเลี่ยงการสร้าง และ ทำลาย object บ่อย ๆ ซึ่งทุก ๆ object ที่ถูกสร้างใน method onDraw จะถูกสร้างและทำลายทิ้ง ทุก ๆ ครั้งที่คุณ refresh หน้าจอ
เราจะเพิ่มประสิทธิภาำพให้โปรแกรมได้โดยการย้ายการสร้าง object พวกนี้ (โดยเฉพาะ instance ของ Paint และ Drawable) ไปใว้ใน constructor

public class MyView extends View {
    // Constructor </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/114763114407029288/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-object-object-method-ondraw.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/114763114407029288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/114763114407029288'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-object-object-method-ondraw.html' title='TIP on Android Development'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-6295396077802862497</id><published>2009-07-16T19:30:00.009+07:00</published><updated>2009-07-16T20:23:04.962+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Introducing the Android Menu System</title><summary type='text'>เมนูมีอยู่ 3 ประเภท
Icon Menu เป็นเมนูที่แสดงเมื่อกดปุ่มเมนู แสดงได้สูงสุด 6 อัน




ไม่สามารถแสดง checkbox, radio button, หรือ shortcut key ได้ จึงไม่ควรใส่พวกนั้นไว้ใน icon menu แล้วก็ถ้าใส่ item ไปมากกว่า 6 item มันจะมีปุ่ม More ขึ้นมาให้กดเพื่อให้แสดง expanded menu ถ้าจะออกจากเมนูก็กดปุ่ม backExpanded Menu ขึ้นมาเมื่อกดปุ่ม More ที่ icon menu มันจะแสดงแสดง list ที่สามารถ scroll ได้ </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/6295396077802862497/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/introducing-android-menu-system.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/6295396077802862497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/6295396077802862497'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/introducing-android-menu-system.html' title='Introducing the Android Menu System'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_limBbuu8bfM/Sl8h4Eij-JI/AAAAAAAAAIk/y_hvAPaN8SY/s72-c/expanded+menu.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-4102264576818757310</id><published>2009-07-13T17:18:00.005+07:00</published><updated>2009-07-15T10:45:29.600+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Modifying Existing Views</title><summary type='text'>การสร้าง widget ใหม่จาก control ที่มีอยู่แล้ว เราจะสร้าง class ขึ้นมาสืบทอดมัน
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;
public class MyTextView extends TextView {
    public MyTextView (Context context, AttributeSet attrs, int defStyle)  {
         super(context, attrs, defStyle);
    }
    public MyTextView (Context context) {
         </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/4102264576818757310/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/modifying-existing-views.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/4102264576818757310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/4102264576818757310'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/modifying-existing-views.html' title='Modifying Existing Views'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-7345180693875470468</id><published>2009-07-13T16:52:00.003+07:00</published><updated>2009-07-13T16:59:59.867+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Layouts</title><summary type='text'>Layout Manager หรือ layouts เป็นส่วนขยายของ ViewGroup class เอาไว้ควบคุมตำแหน่งของ child control บนจอภาพ สามารถ nested ได้
FrameLayout ง่ายที่สุด มันจะเปิด child view ขึ้นมาอ้างอิงด้วยมุมบนซ้าย และจะทับอันอื่น ๆ ไปเรื่อย ๆ
LinearLayout เพิ่ม child ในแนวเส้นตรง อาจจะแนวตั้งหรือแนวนอนก็ได้ สามารถกำหนด weight ให้ child ทุกตัวเพื่อกำหนดขนาดให้สัมพันธ์กันได้
RelativeLayout จัดวางให้สัมพันธ์กับ child </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/7345180693875470468/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-layouts.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/7345180693875470468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/7345180693875470468'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-layouts.html' title='Android Layouts'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-3872720887663420866</id><published>2009-07-13T16:27:00.006+07:00</published><updated>2009-07-13T16:49:15.732+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>The Android Widget Toolbox</title><summary type='text'>Android 0ะมี toolbox ที่เป็น View มาตรฐานที่จะช่วยให้คุณสร้าง User Interface ง่าย ๆ ได้โดยใช้ control พวกนี้ และยังทำให้โปรแกรม ดูเป็นมาตรฐานเดียวกันด้วย

toolbox control ที่เด่น ๆ ได้แก่
 TextView เป็น read only text label สามารถแสดงหลายบรรทัด (Multipleline), การจัดรูปแบบ (String formatting), และ ตัดคับอัตโนมัติได้ (Word Wrapping)EditText ช่องที่เอาไว้กรอกข้อความ สามารถ multipleline และ word </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/3872720887663420866/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-widget-toolbox.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/3872720887663420866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/3872720887663420866'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-widget-toolbox.html' title='The Android Widget Toolbox'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-8299202370546532730</id><published>2009-07-13T03:50:00.003+07:00</published><updated>2009-07-15T09:52:30.055+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Convert cases of strings (tolower/toupper)</title><summary type='text'>Two functions, used to convert c++ strings from upper case to lowercase and vice versa. Each takes a string argument, and returns the converted string. Please note that parameters should be validated before passing them to the functions.

string StringToUpper(string strToConvert)
{
   //change each element of the string to upper case
   for(unsigned int i=0;i&lt;strToConvert.length();i++)
   {
</summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/8299202370546532730/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/c-convert-cases-of-strings.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/8299202370546532730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/8299202370546532730'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/c-convert-cases-of-strings.html' title='C Convert cases of strings (tolower/toupper)'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-6777789483124010770</id><published>2009-07-13T03:47:00.003+07:00</published><updated>2009-07-15T10:50:10.210+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>Check input is number or not</title><summary type='text'>
#include 
// Need ctype.h for isdigit and isalnum functions.
#include 

int main(void)
{
 char var[10];    // This is the variable to store input.
 int i = 0;
 int varisnum = 0;    // Is var all numbers?  1 for yes, 0 for no.
 
 scanf("%s", var);

 while (isalnum(var[i]) != 0) {    // Loop until it a character is not alpha-numeric.
  if (isdigit(var[i]) != 0) {    // Is var[i] a numeric digit?
</summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/6777789483124010770/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/check-input-is-number-or-not.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/6777789483124010770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/6777789483124010770'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/check-input-is-number-or-not.html' title='Check input is number or not'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-5725547521107304382</id><published>2009-07-13T03:29:00.004+07:00</published><updated>2009-07-13T03:47:27.548+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C scanf(), scanf_s()</title><summary type='text'>scanf() and scanf_s() - อ่านข้อมูลจาก standard input

char a, b[20];
int i;
 scanf("%c %s %d",  &amp;a, b, &amp;i);
scanf_s("%c %s %d", &amp;a, b, 20, i);
/* scanf_s ทำมากัน buffer overflow เวลารับ string ต้องใสขนาดด้วย*/

       c    Character. When used with    scanf()  functions, specifies single-byte character; when used with  wscanf()  functions, specifies wide character. White-space characters that  </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/5725547521107304382/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/c-scanf-scanfs.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/5725547521107304382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/5725547521107304382'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/c-scanf-scanfs.html' title='C scanf(), scanf_s()'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-5160947968528789137</id><published>2009-07-13T02:06:00.001+07:00</published><updated>2009-07-13T02:08:25.336+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>Set your own date and time format ...</title><summary type='text'>Does NOT need windows.h (Even though this uses a library call, it may not be so well known these days.) This demos using 'time.h' and a call to strftime( bufferStr, bufsize, formatString, pointer_to_struc_tm_info ) ... and provides sufficient info for you to set your own date and time formats ... or design a class dateTime 

/*
* Doesn't use windows.h .... Uses a call to a NOT so well known 
* </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/5160947968528789137/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/set-your-own-date-and-time-format.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/5160947968528789137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/5160947968528789137'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/set-your-own-date-and-time-format.html' title='Set your own date and time format ...'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-1415924903076865552</id><published>2009-07-12T01:54:00.003+07:00</published><updated>2009-07-12T02:05:30.834+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android UI Design</title><summary type='text'>Android ใช้ UI แบบใหม่ที่คิดค้นขึ้นเอง ประกอบด้วยส่วนสำคัญ 3 อย่างคือ
View เป็น User Interface พื้นฐานสำหรับสิ่งต่าง ๆ ที่อยู่บนจอภาพ เช่น control หรือ widget ทั้งการควบคุม User Interface และ class ของ layout ก็สืบทอดจาก Views ViewGroup เป็นส่วนขยายของ class View ที่ประกอบไปด้วย child ของ Views หลายอัน โดยสิบทอด class Viewgroup ทำให้ View แต่ละอันใน Viewgroup สามาถติดต่อสื่อสารกันได้ </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/1415924903076865552/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-ui-design.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/1415924903076865552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/1415924903076865552'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-ui-design.html' title='Android UI Design'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-3545796172622998077</id><published>2009-07-10T15:58:00.004+07:00</published><updated>2009-07-17T12:01:29.595+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Application Fundamentals</title><summary type='text'>Activities
Activity คือหน้า UI ที่ user กระทำการต่าง ๆ บนนั้น อาจจะเป็นการแสดงเมนูให้เลือก, แสดงรูปภาพพร้อมคำอธิบาย, อะไรก็ตาม ฯลฯ โปรแกรม text โปรแกรมหนึ่งอาจจะมี activity นึงที่ใช้แสดงเบอร์ที่จะส่งไป และมี activity ที่สองที่จะเขียนข้อความที่จะส่ง และอีก activity ไว้ดูข้อความก่อนหน้านั้น หรือเอาไว้แก้ setting ซึ่งถึงแม้มันจะทำงานร่วมกันในหน้า UI หน้าเดียว แต่ activity แต่ละตัวก็ไม่ขึ้นต่อกัน </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/3545796172622998077/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-application-fundamentals.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/3545796172622998077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/3545796172622998077'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/android-application-fundamentals.html' title='Android Application Fundamentals'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-1310661043887358052</id><published>2009-07-10T15:49:00.000+07:00</published><updated>2009-07-10T16:08:11.925+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>State Change</title><summary type='text'>
import android.app.Activity;
import android.os.Bundle;
public class MyActivity extends Activity {
    // Called at the start of the full lifetime.
    @Override
    public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
         // Initialize activity.
    }
    // Called after onCreate has finished, use to restore UI state
    @Override
    public void onRestoreInstanceState(</summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/1310661043887358052/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/import-android.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/1310661043887358052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/1310661043887358052'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/import-android.html' title='State Change'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_limBbuu8bfM/SlcBmMv0dqI/AAAAAAAAAIY/wzO7VmlZdHs/s72-c/android-states.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-7130202489451924951</id><published>2009-07-10T15:36:00.000+07:00</published><updated>2009-07-10T15:46:45.689+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Activity States</title><summary type='text'>การเปลี่ยน state ของ Activity ใน stack
Active อยู่บนสุดของ stackPaused อาจจะมองเห็นอยู่ แต่ไม่ได้ถูก focus จะเกิดตอนที่มี transparent หรือ non-fullscreen อยู่ข้างบน แต่ Activity ยังถือว่า Active อยู่ แต่จะไม่รับ user input event
Stopped ไม่เห็น Activity นั้นอีกแล้ว แต่มันจะยังคงอยู่ใน memory จนกว่า Android จะเคลียร์ทิ้ง ดังนั้นควรจะ save ข้อมูล และ UI ปัจจุบันเอาไว้ด้วย </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/7130202489451924951/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/activity-states.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/7130202489451924951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/7130202489451924951'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/activity-states.html' title='Activity States'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-396678403152362639</id><published>2009-07-10T13:40:00.002+07:00</published><updated>2009-07-14T10:39:55.345+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Creating Resource for Different Language and Hardware</title><summary type='text'>ในโฟลเดอร์ res/ สามารถกำหนดภาษา, สถานที่, ลักษณะของจอ ฯลฯ ได้โดย
สร้างโฟลเดอร์เพิ่ม เช่น

Project/
    res/
         values/
              strings.xml
         values-fr/
              strings.xml
         values-fr-rCA/
              strings.xml

และสามารถปรับแต่ง resource ได้อีกหลายอย่าง คือ
Language ใช้ISO 639-1 ที่เป็นตัวย่อ 2 ตัวอักษร  เป็นตัวอักษรตัวเล็ก เช่น en, thRegion ใช้ "r" ตัวเล็ก </summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/396678403152362639/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/07/creating-resource-for-different.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/396678403152362639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/396678403152362639'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/07/creating-resource-for-different.html' title='Creating Resource for Different Language and Hardware'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4333515732090309068.post-4295391163095941232</id><published>2009-06-01T16:58:00.000+07:00</published><updated>2009-06-01T17:02:30.327+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><title type='text'>C Language on Unix FAQs</title><summary type='text'>I am trying to use my Windows PC at home to telnet to  charlie.it.uts.edu.au and use FTP to transfer my files across for  compiling on the university's UNIX computers. I find that  with the C language my text editors (I have tried both Wordpad and Notepad) are  inserting illegal whitespace characters making my code uncompilable.  The message likes:    
... : warning: invalid white space character</summary><link rel='replies' type='application/atom+xml' href='http://pichayas.blogspot.com/feeds/4295391163095941232/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://pichayas.blogspot.com/2009/06/c-language-on-unix-faqs.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/4295391163095941232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4333515732090309068/posts/default/4295391163095941232'/><link rel='alternate' type='text/html' href='http://pichayas.blogspot.com/2009/06/c-language-on-unix-faqs.html' title='C Language on Unix FAQs'/><author><name>Tazz</name><uri>http://www.blogger.com/profile/06517764603496395382</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
