Giter Site home page Giter Site logo

cm-android-exam's Introduction

CodeMobile Challenge

สร้างโปรเจค Android แบบ Empty Activity และ Kotlin

2. สร้าง Activity ขึ้นมา 3 Activity

  • Login Activity
  • Home Activity
  • Detail Activity

2.1 ค่าเริ่มต้น Navigate มาหน้า Login Activity

3. หน้า Login Page มี UI ดังนี้

3.1 ช่อง input Email

3.2 ช่อง input Password

3.3 ปุ่มเข้าสู่ระบบ

3.4 เพิ่ม Validation

  • ตรวจสอบ Format Email โดยใช้ Regex
  • ตรวจสอบความรหัสผ่าน ความยาว 8 ตัวขึ้นไป

3.5 เมื่อกดปุ่มเข้าสู่ระบบ ตรวจสอบ Email = [email protected] และ Password = 12345678

    - ถ้าถูกต้อง Navigate ไปหน้า Home Activity
     
    - ถ้าผิดให้ Toast หรือ AlertDialog ข้อความ "Email or password incorrect"

4. หน้า Home Activity มีเงื่อนไขตามนี้ 4.1 เน้นการใช้เครื่องมือและไลบรารีที่ทันสมัย 4.2 fetch ข้อมูล GET: https://dummyjson.com/products
4.3 แสดงข้อมูลที่ fetch โดยใช้ Recyclerview เป็น Card สวยงาม มีข้อมูลดังนี้

Screenshot 2567-05-24 at 14 41 20
  • Thumbnail
  • Title
  • Price
  • Stock
  • ปุ่ม Detail

4.4 เมือกดปุ่ม Detail ให้ส่ง id product ผ่าน params ไปหน้า Detail Activity

5. เพิ่ม input ช่องค้นหาข้อมูลสินค้า ค้นหาชื่อสินค้าแบบ Debound Time(1 วินาที) และ contain string ในหน้า Home Activity

6. เพิ่มปุ่ม Dropdown 5 เมนู ในหน้า Home Activity

  • ทั้งหมด (แสดงสินค้าทั้งหมด)
  • ราคามากว่า 1000 (กรองสินค้าที่มีราคา 1000 ขึ้นไป และมี %ส่วนลด มากกว่า 0)
  • แสดงราคารวมต่อชิ้น (เพิ่ม Column ขึ้นมาอีก 1 Column สำหรับแสดง ราคารวมต่อชิ้น) [เพิ่ม key totalPrice เข้าไปใน data class Product เพื่อแสดงใน column]
  • เรียงเรตติ้ง (เรียง rating สินค้าแบบ desc และ price แบบ asc)
  • แสดงราคารวมทั้งหมด (คำนวนราคาสินค้าทั้งหมด ของ array สินค้า) [เพิ่ม Label ราคารวม ไว้เป็น Header Recyclerview]

7. หน้า Detail Activity

7.1 Get id product จาก params และ fetch ข้อมูลสินค้า GET:https://dummyjson.com/products/:id

7.2 แสดงข้อมูลสินค้า ตามสวยงาม

  • Images 150*150
  • Title
  • Price
  • Stock

8. ปริ้นข้อความใน Life Cycle ต่างๆ ของ Activity ในหน้า Detail Page

9. เพิ่ม Interceptor http

9.1 Add header key CMReq = “request” ตอน Request http

9.2 Add header key CMERes = “response” ตอน Response http

10. กำหนดค่าเริ่มต้น Navigate path

10.1 ถ้า ยังไม่ได้ Login ให้ Navigate มาหน้า Login Activity

10.2 ถ้า Login แล้วให้ Navigate มาหน้า Home Activity

cm-android-exam's People

Contributors

oldster189 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.