Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Android
Android
  1. สร้าง Custom Toast Message ใน Android

    Toast และ Custom Toast Toast คือข้อความแจ้งเตือนเล็กน้อย แสดงชั่วคราวแล้วหายเอง Custom Toast คือการปรับแต่ง Layout, สี, ฟอนต์, ไอคอน, Animation ให้ตรงกับ Brand/Design System ของแอป วิธีสร้าง Custom Toast แบบ XML Layout 1. สร้าง Layout: res/layout/custom_toast.xml <?xml version=1.0 encoding=utf

  2. เพิ่ม Picasso Library ใน Android Studio

    Picasso คืออะไร? Picasso เป็น Image Loading Library จาก Square Inc. โดดเด่นด้วย API ที่เรียบง่ายมาก One-liner เหมาะสำหรับโปรเจกต์ที่ต้องการโหลดภาพพื้นฐาน ไม่ต้องการฟีเจอร์ซับซ้อน כמו GIF/Video การติดตั้ง build.gradle (Module: app) dependencies { // Picasso เวอร์ชันล่าสุด (ตรวจสอบที่ GitHub: s

  3. โหลดภาพด้วย Glide ใน Android

    Glide คืออะไร? Glide เป็น Library โหลดและแสดงภาพ (Image Loading Library) ที่ทรงพลัง พัฒนาโดย Bump Technologies ใช้งานง่าย รองรับการโหลดจาก URL, File, Resource, Assets รวมถึง GIF, Video Thumbnail และการ Transform รูปภาพ ทำไมต้องใช้ Glide? จัดการ Memory และ Disk Cache อัตโนมัติ ป้องกัน OOM

  4. NavigationView และ Navigation Drawer ใน Android

    Navigation Drawer คืออะไร? Navigation Drawer (หรือ Slide Menu) เป็น UI Pattern ที่ซ่อนเมนูไว้ด้านข้าง (มักเป็นซ้าย) ลากออกมาได้ โดยใช้ DrawerLayout เป็น Root View และ NavigationView สำหรับแสดงเมนู ปัจจุบันเป็นมาตรฐานของ Material Design โครงสร้างไฟล์ Layout (สร้างโดย Android Studio Template) 1. ac

  5. SearchView ใน Android: การค้นหาข้อมูลใน ListView

    SearchView คืออะไร? SearchView เป็น Widget สำหรับรับคำค้นหาจากผู้ใช้ มักวางที่ Toolbar/ActionBar หรือใน Layout โดยตรง รองรับการกรองข้อมูลแบบ Real-time (Filter) และการส่งคำค้นหา (Submit) โครงสร้างพื้นฐาน SearchView - UI รับคำค้นหา ListView/RecyclerView - แสดงรายการข้อมูล Adapter + Filt

  6. Handler ใน Android: การสื่อสารระหว่าง Thread

    Handler คืออะไร? Handler เป็นกลไกหลักใน Android สำหรับการส่งข้อความ (Message) และ Runnable ระหว่าง Thread โดยเฉพาะการสื่อสารจาก Background Thread ไปยัง Main Thread (UI Thread) เนื่องจาก Android ไม่อนุญาตให้เข้าถึง UI จาก Thread อื่นโดยตรง หลักการทำงาน Looper: วนลูปรอ Message จาก MessageQueue

  7. วิธีแสดง Alert Dialog ใน Android

    Alert Dialog คืออะไร? Alert Dialog เป็นกล่องโต้ตอบ (Popup) ที่แสดงข้อความและให้ผู้ใช้เลือกการกระทำ เช่น ยืนยัน (OK) หรือยกเลิก (Cancel) ใช้สำหรับการยืนยันการลบข้อมูล ออกจากแอป หรือการกระทำสำคัญอื่นๆ เมธอดหลักของ AlertDialog.Builder เมธอดคำอธิบาย setTitle(CharSequenc

  8. วิธีสร้าง CircularImageView ใน Android

    CircularImageView คืออะไร? CircularImageView คือ ImageView ที่แสดงภาพในรูปทรงวงกลม มักนิยมใช้สำหรับโปรไฟล์ผู้ใช้ แอปสื่อสาร หรือ UI ที่ต้องการรูปทรงกลม สามารถทำได้ทั้งแบบเขียนเอง (Custom View) และใช้ Library สำเร็จรูป วิธีใช้ Library: CircularImageView โดย Mikhael Lopez Library นี้เป็นที่นิยม ใช้ง

  9. วิธีส่งข้อมูลระหว่าง Activity ด้วย Serializable ใน Android

    การทำความเข้าใจ Serialization ใน Android Serialization เป็นกระบวนการแปลงสถานะของออบเจ็กต์ให้กลายเป็น Byte Stream ซึ่งเป็นข้อมูลที่ไม่ขึ้นกับแพลตฟอร์ม ทำให้สามารถส่งผ่าน Intent ระหว่าง Activity ได้ ใน Java เราจะใช้ interface java.io.Serializable ซึ่งเป็น Marker Interface (ไม่มีเมธอด) เพื่อบอกให้ JVM

  10. วิธีเพิ่มรายการใน Spinner (Dropdown) บน Android

    Spinner (Dropdown) ใน Android: เพิ่ม Item และจัดการ Event Spinner = Dropdown Selector ใช้เลือก 1 รายการจากหลายรายการ ขั้นตอนที่ 1: Layout XML <Spinner android:id=@+id/spinner android:layout_width=wrap_content android:layout_height=wrap_content android:prompt=@string/app_name />

  11. Intent ใน Android มีกี่ประเภท? ทำความเข้าใจ Explicit และ Implicit Intent

    Intent ใน Android: 2 ประเภทหลัก Intent คือ Mechanism สำหรับ Request Action ระหว่าง Components (Activity, Service, BroadcastReceiver) 1. Explicit Intent (ชัดเจน) ระบุ Component Class โดยตรง ใช้ภายในแอปเดียวกัน // Start Activity Intent intent = new Intent(MainActivity.this, SecondActivity.class); int

  12. Intent ใน Android คืออะไร? ตัวอย่างการใช้งานเริ่ม Activity ใหม่

    Intent ใน Android: กลไกการสื่อสารระหว่าง Components Intent คือ Object ที่ใช้ Request Action: Start Activity, Start Service, Send Broadcast, หรือส่งข้อมูลระหว่าง Components ประเภทของ Intent Explicit Intent: ระบุ Target Class โดยตรง (Internal) Implicit Intent: ระบุ Action/Data ให้ System หา Componen

  13. วิธีสร้าง Custom ListView ใน Android (ซ้ำกับ 1004060804)

    Custom ListView ใน Android: รูปภาพ + ข้อความ + Custom Adapter หมายเหตุ: เนื้อหาบทความนี้ซ้ำกับ Article ID 1004060804 เกือบทั้งหมด นี่คือเวอร์ชันที่ปรับปรุงและเพิ่มรายละเอียด ขั้นตอนที่ 1: Main Layout (activity_main.xml) <ListView android:id=@+id/list android:layout_width=match_parent

  14. วิธีแสดงรายการรูปภาพและข้อความใน ListView แบบ Custom บน Android

    Custom ListView: แสดงรูปภาพ + ข้อความ ด้วย Custom Adapter ใช้ Custom Adapter + Custom Layout สำหรับแต่ละ Row (Image + Text) ขั้นตอนที่ 1: Layout หลัก (activity_main.xml) <ListView android:id=@+id/list android:layout_width=match_parent android:layout_height=match_parent android:di

  15. วิธีสร้าง ListView ใน Android

    สร้าง ListView แบบง่ายใน Android ด้วย ArrayAdapter ListView แสดงรายการข้อมูลแนวตั้ง Scroll ได้ คลิกแต่ละ Item ได้ ขั้นตอนที่ 1: Layout XML (activity_main.xml) <ListView android:id=@+id/list android:layout_width=match_parent android:layout_height=match_parent /> ขั้นตอนที่ 2: Main

  16. ตัวอย่างการใช้ WebView ใน Android แบบสมบูรณ์

    WebView Implementation ใน Android: คู่มือครบถ้วน WebView เป็น View ที่แสดง HTML/Web Content ภายในแอป ใช้ WebViewClient ควบคุม Navigation WebView Methods สำคัญ MethodDescription clearHistory()ล้างประวัติ Back/Forward destroy()ทำลาย WebView ปล่อย Memory getUrl()ดึง URL ปัจจุบัน getTitle()ดึง Title ข

  17. แพ็กเกจ Mobile App ด้วย SAPUI5 Built-in สำหรับ Android ใช้ Cordova

    แพ็กเกจ SAPUI5 Mobile App สำหรับ Android ด้วย Apache Cordova SAPUI5 มี Static Mobile Packages สำหรับ Hybrid App Development: sapui5-mobile-static.zip และ sapui5-mobile-opt-static.zip (Optimized) สองแนวทางพัฒนา SAPUI5 Mobile แนวทางคำอธิบาย Web AppLoad จาก URL, รันใน Browser, ไม่ต้อง Package Hybrid

  18. การรวม SAP กับ Android ผ่าน SAP Cloud Platform Mobile Services

    Integrating SAP with Android: SAP Cloud Platform Mobile Services SAP Cloud Platform Mobile Services (SCPms) / SAP Mobile Services (SMP 3 / HCPms) เป็นแพลตฟอร์มสำหรับสร้าง Enterprise Mobile Apps ที่เชื่อมต่อ SAP Backend ได้ปลอดภัย คุณสมบัติหลัก Offline OData: ใช้งานข้อมูลออฟไลน์ ซิงค์เมื่อออนไลน์ S

  19. วิธีตรวจสอบการเชื่อมต่ออินเทอร์เน็ตบน Android

    ตรวจสอบสถานะ Internet Connection บน Android ด้วย BroadcastReceiver ใช้ ConnectivityManager และ BroadcastReceiver ฟังการเปลี่ยนแปลง Network State แบบ Real-time ขั้นตอนที่ 1: สร้างโปรเจกต์ Android Studio File → New Project → Empty Activity ขั้นตอนที่ 2: เพิ่ม Permission ใน AndroidManifest.xml <us

Total 1462 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:74/74  20-คอมพิวเตอร์/Page Goto:1 68 69 70 71 72 73 74