ความเห็น: 12
อุปสรรคก่อนความสำเร็จ
ขอบอกรายละเอียดก่อนนะครับ
"โปรแกรมแสดงความพึงพอใจของลูกค้า ศูนย์เครื่องมือวิทยาศาสตร์ฯ" (บนแท็บเล็ต)
ผมเริ่มต้นทำงานชิ้นนี้ในการทำApp Android โดยใช้โปรแกรมEclipse ภาษาที่ใช้เขียนทั้งหมดจะเป็นภาษาJAVA ซึ่งผมไม่ได้มีความรู้ในการทำApp Androidมาก่อน ตอนนี้ผมพัฒนามาถึงขั้นตอนสุดท้ายเลยก็ว่าได้ แต่ก็ต้องเจอกับอุปสรรคขั้นสุดท้าย ที่App Android ไม่สามารถเก็บบันทึกข้อมูลได้ เพราะไม่รู้ว่าจะต้องใช้คำสั่งหรือวิธีการใด ให้งานผมประสบความสำเร็จ อยากจะสอบถามผู้ที่รู้ หรือผู้ที่สามารถแนะนำได้ครับ ว่าผมควรจะใช้วิธีการใดให้ App Androidออกมาสมบูรณ์เก็บบันทึกข้อมูลได้ครับ
หน้าตาโปรแกรมที่จะออกมาครับ (บนแท็บเล็ต)ในภาพนี้จำลองระบบAndroid บน คอมพิวเตอร์ครับ
ตัวอย่างโค้ดที่ใช้ในโปรแกรมครับ Activity_main.xml(ยังขาดคำสั่งในการเก็บข้อมูล)
ตัวอย่างโค้ดที่ใช้ในโปรแกรมครับ MainActivity.Java
ผมเริ่มต้นงานนี้จาก 0 (ไม่มีความรู้ในด้านการเขียนโปรแกรม App Android ตัวนี้เลย แต่มีพื้นฐานในการใช้คอมพิวเตอร์) ผมใช้วิธีการศึกษาด้วยตนเอง ไม่ได้ไปเรียนจากที่ไหน อาจจะเข้าใจถูกบ้างผิดบ้างก็ต้องขออภัยนะครับ
ขอรบกวนท่านที่มีความรู้หรือพอจะสามารถแนะนำให้โปรแกรมงานตัวนี้ประสบความสำเร็จกับเด็กคนนึงด้วยครับ
ขอขอบคุณครับ
แจ็คส์(แฟนฉัน)
บันทึกอื่นๆ
- เก่ากว่า « 3 เดือนกับงานที่ศูนย์เครื่องมือว...
- ใหม่กว่า » ถ้าหากเรามีเงินมากๆ เราจะใช้เงิน...
ความเห็น
*ตัวอย่างโค้ด Activitymain.xml ครับ
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="@string/hello_world"
android:textColor="#FFD700"
android:textSize="28sp" />
<ImageButton
android:id="@+id/imageButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/pic3" />
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/imageButton2"
android:src="@drawable/pic1" />
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/imageButton3"
android:src="@drawable/pic2" />
<ImageButton
android:id="@+id/imageButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/imageButton3"
android:src="@drawable/pic4" />
<ImageButton
android:id="@+id/imageButton5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/imageButton4"
android:src="@drawable/pic5" />
</RelativeLayout>
*ตัวอย่างโค้ด MainActivity.Java ครับ
package th.ac.sec.helloworld;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
ผมมึนตึ๊บครับลุง เรื่อง code เรื่องไรเจอทีไรมึนทุกที คงต้องปรึกษาท่าน iHum แล้วล่ะครับ
แต่ลองไปดูแถวนี้ดูนะครับ
http://www.androidcode.in.th/2012/?p=310#more-310
เป็นตัวอย่าง code ของการสร้าง Rating Dialog โดยใช้ Custom Dialog
ดูแล้วน่าจะค้าย ๆ กันครับ
หรือที่นี่ครับ
http://code.google.com/p/mobile-voting-system/
แต่ลิงค์แรกน่าจะตรงใจมากกว่าครับ
อิอิอิ
เราเอง
ผมปรึกษาพี่ iHum แล้วครับ ,,พี่iHum ไม่ได้จับJava มาเป็น 10 ปีแล้วครับ
เลยได้คำแนะนำมาว่าให้ลองถามพี่Our Shangri-La ดู พีจะแนะนำได้ครับ
ส่วนลิงค์ที่ให้มา ผมจะลองศึกษาดูนะครับ แต่จากที่ดูคร่าวๆ น่าจะมีประ
โยชน์มากครับ
ขอบคุณมากๆ นะครับ :)
ขอบคุณมากๆ เลยครับ ,,ซึ้งใจ TT"
ได้ประโยชน์มากครับ ,,ต้องเอามาแมทรวมกันครับ
ดูว่าจะเก็บได้ค่าข้อมูลได้รึป่าว
ถ้ารวมแล้วยังหาทางไม่ถูก ที่หน่วยระบาดมีน้องที่เขาทำเวปข้อมูลวิจัย ให้ interface อยู่บน android tablet อยู่ จะแว๊บมาคุยก็ได้ครับ
อิอิอิ
เราเอง
22 ตุลาคม 2556 22:13
#93845
มีรายละเอียดข้อมูลเพิ่มเติมสามารถขอดูรายละเอียดมากกว่านี้ได้นะครับ