Trang 1 của 2 12 CuốiCuối
Kết quả 1 đến 10 của 11
  1. #1
    Ngày tham gia
    Feb 2015
    Bài viết
    0

    Hướng dẫn mod Notification Panel!

    [color=rgb(20, 20, 20)]đã có rất nhiều bài viết hướng dẫn mod trong suốt được chia sẻ nhưng chưa được cụ thể cho lắm, mình xin mạn phép viết lại và nêu ý nghĩa cũ thể của từng đoạn code theo cách hiểu của mình. việc mod status bar, notification bar cũng như navigation bar có thể thông qua việc thay ảnh png hoặc ảnh 9 patch hoặc thay mã màu tương ứng (về cách tạo file ảnh 9 patch mình sẽ đề cập đến sau). các bạn mod bằng cách thay ảnh có thể thực hiện trên photoshop (sẽ đẹp hơn so với khi sử dụng mã màu) phụ thuộc vào sở thích của mỗi người nên mình hướng dẫn theo cách sử dụng mã màu.

    bảng mã màu hexa bao gồm 6 kí tự bạn có thể xem ở đây http://www.thevcwc.com/bang-ma-mau-hexa

    tùy vào mức độ trong suốt mà mình thích, bạn có thể thêm 2 kí tự biểu diễn độ trong suốt của màu vào trước 6 kí tự quy định màu. ví dụ với 4 mức độ trong suốt phổ biến nhất đối với màu đen (#000000)[/color]
    • trong suốt 100%: #[color=rgb(255, 0, 0)]00[/color]000000
    • trong suốt 75%: #[color=rgb(255, 0, 0)]3f[/color]000000
    • trong suốt 50%: #[color=rgb(255, 0, 0)]7f[/color]000000
    • trong suốt 25%: #[color=rgb(255, 0, 0)]bf[/color]000000
    • không trong suốt: #[color=rgb(255, 0, 0)]ff[/color]000000
    [color=rgb(20, 20, 20)](2 kí tự màu đỏ quy định độ trong suốt hay không trong suốt)

    i. các công cụ cần thiết cho việc mod trong suốt:[/color]
    • java (https://www.java.com/en/download/)
    • apktool (https://drive.google.com/file/d/0b4kqoejkb8uicmdxvy1pz1vsbk0/edit?usp=sharing)
    • notepad ++ (http://notepad-plus-plus.org/)
    • framework.apk
    • systemui.apk
    [color=rgb(20, 20, 20)]sau khi đã download và cài đặt đầy đủ các công cụ, chúng ta tiến hành bung framework và systemui để tiến hành chỉnh sửa code (các vần đề về bung apk cũng như build apk đã được hướng dẫn rất nhiều trên mạng nên mình ko nói cụ thể nữa)

    ii. tiến hành mod trong suốt:

    trong suốt notification panel: mình sẽ hướng dẫn làm trong suốt từ trên xuống dưới[/color]
    • đầu tiên là thanh expanded header: (thanh trên cùng hiển thị thời gian)
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded_header.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 5):


    Mã:
    <linearlayout android:gravity="center_vertical" android:orientation="horizontal" android:android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselinealigned="false">
    phần android:mã màu các bác thay bằng #7f000000[/color] (tương ứng vs trong suốt 50%) hoặc mã màu các bác thích

    • thanh ngang chứa 2 tab "cài đặt nhanh" và "đặt phím tắt"
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_easy_setting_tabview.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 4 và 8):


    Mã:
    <linearlayout android:id="@id/easysetting_tab" android:android:clickable="true" android:layout_width="183.0dip" android:layout_height="38.0dip" android:layout_marginright="-7.0dip" android:layout_weight="1.0" android:splitmotionevents="false">
    Mã:
    <linearlayout android:id="@id/quicksetting_tab" android:android:clickable="true" android:layout_width="184.0dip" android:layout_height="38.0dip" android:layout_weight="1.0" android:splitmotionevents="false">
    phần android:và android:các bác nên để trong suốt hoàn toàn với mã màu [color=rgb(255, 0, 0)]#00000000[/color]

    • tiếp theo là thanh easy setting (thanh chứa các biểu tượng cài đặt nhanh):
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_easy_setting.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2):


    Mã:
    <linearlayout android:orientation="vertical" android:id="@id/status_bar_easy_setting" android:android:layout_width="fill_parent" android:layout_height="wrap_content" android:splitmotionevents="false"
    phần android:mã màu các bác thay bằng #7f4d4d4d[/color] hoặc mã màu các bác thích

    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_easy_setting_scroll.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2):


    Mã:
    <linearlayout android:orientation="vertical" android:id="@id/status_bar_easy_setting" android:android:layout_width="fill_parent" android:layout_height="wrap_content" android:splitmotionevents="false"
    phần android:các bác thay bằng #7f575757[/color]

    • tiếp tới là thanh brightness panel (thanh điều chỉnh độ sáng tối màn hình):
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 15):


    Mã:
    <linearlayout android:orientation="vertical" android:id="@id/brightness_panel" android:android:layout_width="fill_parent" android:layout_height="wrap_content">
    phần android:mã màu các bác chỉnh thành #7f575757[/color] hoặc mã màu các bác thích

    • ngay phía dưới là thanh màu xanh hiển thị tiêu đề "thông báo"
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded_notification_title.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2 và 5):


    Mã:
    <relativelayout android:layout_gravity="center_vertical" android:orientation="horizontal" android:android:paddingtop="2.0dip" android:paddingbottom="2.0dip" android:layout_width="fill_parent" android:layout_height="30.0dip"
    Mã:
    <textview android:textsize="16.0dip" android:textcolor="#ffffffff" android:gravity="center" android:id="@id/clear_all_button" android:android:paddingtop="0.0dip" android:paddingbottom="0.0dip" android:layout_width="102.0dip" android:layout_height="30.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignparentright="true" android:contentdescription="@string/accessibility_clear_all" style="?android:attr/buttonstyle" />
    phần android:dòng thứ 2 các bác thay thế @drawable/easy_setting_title_bg[/color] bằng mã màu [color=rgb(255, 0, 0)]#7f000000[/color] hoặc mã màu các bác thích.
    [color=rgb(20, 20, 20)]phần android:là nền thanh xóa các bác thay thế bằng [color=rgb(255, 0, 0)]#7f000000[/color] hoặc mã màu các bác thích

    • thanh chiếm nhiều diện tích nhất là notification panel phía dưới (chứa các thông báo):
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2):


    Mã:
    <framelayout android:id="@id/notification_panel" android:android:paddingtop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginleft="@dimen/notification_panel_margin_left"
    phần android:các bác thay mã màu bằng #7f000000[/color] hoặc mã màu các bác thích
    [color=rgb(20, 20, 20)]
    [/color]
    [color=rgb(20, 20, 20)]tham khảo thêm các hướng dẫn hữu ích khác tại đây![/color]

  2. #2
    Ngày tham gia
    Feb 2015
    Bài viết
    0
    :x:like:

  3. #3
    Ngày tham gia
    Jul 2015
    Bài viết
    2
    bác ơi có cách nào làm thanh toggle xuống phía dưới màn hình đc ko ạ ?

  4. #4
    Ngày tham gia
    Feb 2015
    Bài viết
    0
    quá ngon.

    gửi từ lg-f200l của tôi sử dụng tapatalk 2

  5. #5
    Ngày tham gia
    Apr 2014
    Bài viết
    0
    ủng hộ :d

  6. #6
    Ngày tham gia
    Feb 2015
    Bài viết
    0
    cái này bác chủ làm trên 4.1 hay 4.4 vậy?
    sao mình làm trên 4.4 vú ko có mấy code ở trên

  7. #7
    Ngày tham gia
    Feb 2015
    Bài viết
    0
    4.4 vu2 ko gặp code theo bác chủ nhĩ.

    f200s của tui !!!!!!!!!

  8. #8
    Ngày tham gia
    Jun 2014
    Bài viết
    0
    Trích dẫn Gửi bởi myster91
    [color=rgb(20, 20, 20)]đã có rất nhiều bài viết hướng dẫn mod trong suốt được chia sẻ nhưng chưa được cụ thể cho lắm, mình xin mạn phép viết lại và nêu ý nghĩa cũ thể của từng đoạn code theo cách hiểu của mình. việc mod status bar, notification bar cũng như navigation bar có thể thông qua việc thay ảnh png hoặc ảnh 9 patch hoặc thay mã màu tương ứng (về cách tạo file ảnh 9 patch mình sẽ đề cập đến sau). các bạn mod bằng cách thay ảnh có thể thực hiện trên photoshop (sẽ đẹp hơn so với khi sử dụng mã màu) phụ thuộc vào sở thích của mỗi người nên mình hướng dẫn theo cách sử dụng mã màu.

    bảng mã màu hexa bao gồm 6 kí tự bạn có thể xem ở đây http://www.thevcwc.com/bang-ma-mau-hexa

    tùy vào mức độ trong suốt mà mình thích, bạn có thể thêm 2 kí tự biểu diễn độ trong suốt của màu vào trước 6 kí tự quy định màu. ví dụ với 4 mức độ trong suốt phổ biến nhất đối với màu đen (#000000)[/color]
    • trong suốt 100%: #[color=rgb(255, 0, 0)]00[/color]000000
    • trong suốt 75%: #[color=rgb(255, 0, 0)]3f[/color]000000
    • trong suốt 50%: #[color=rgb(255, 0, 0)]7f[/color]000000
    • trong suốt 25%: #[color=rgb(255, 0, 0)]bf[/color]000000
    • không trong suốt: #[color=rgb(255, 0, 0)]ff[/color]000000
    [color=rgb(20, 20, 20)](2 kí tự màu đỏ quy định độ trong suốt hay không trong suốt)

    i. các công cụ cần thiết cho việc mod trong suốt:[/color]
    • java (https://www.java.com/en/download/)
    • apktool (https://drive.google.com/file/d/0b4kqoejkb8uicmdxvy1pz1vsbk0/edit?usp=sharing)
    • notepad ++ (http://notepad-plus-plus.org/)
    • framework.apk
    • systemui.apk
    [color=rgb(20, 20, 20)]sau khi đã download và cài đặt đầy đủ các công cụ, chúng ta tiến hành bung framework và systemui để tiến hành chỉnh sửa code (các vần đề về bung apk cũng như build apk đã được hướng dẫn rất nhiều trên mạng nên mình ko nói cụ thể nữa)

    ii. tiến hành mod trong suốt:

    trong suốt notification panel: mình sẽ hướng dẫn làm trong suốt từ trên xuống dưới[/color]
    • đầu tiên là thanh expanded header: (thanh trên cùng hiển thị thời gian)
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded_header.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 5):


    Mã:
    <linearlayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselinealigned="false">
    phần android:background="#ff000000" mã màu các bác thay bằng #7f000000[/color] (tương ứng vs trong suốt 50%) hoặc mã màu các bác thích

    • thanh ngang chứa 2 tab "cài đặt nhanh" và "đặt phím tắt"
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_easy_setting_tabview.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 4 và 8):


    Mã:
    <linearlayout android:id="@id/easysetting_tab" android:background="@drawable/easy_setting_tab_sel" android:clickable="true" android:layout_width="183.0dip" android:layout_height="38.0dip" android:layout_marginright="-7.0dip" android:layout_weight="1.0" android:splitmotionevents="false">
    Mã:
    <linearlayout android:id="@id/quicksetting_tab" android:background="@drawable/quick_setting_tab_nor_seperator" android:clickable="true" android:layout_width="184.0dip" android:layout_height="38.0dip" android:layout_weight="1.0" android:splitmotionevents="false">
    phần android:background="@drawable/easy_setting_tab_sel" và android:background="@drawable/quick_setting_tab_nor_seperator"[/color] các bác nên để trong suốt hoàn toàn với mã màu [color=rgb(255, 0, 0)]#00000000[/color]

    • tiếp theo là thanh easy setting (thanh chứa các biểu tượng cài đặt nhanh):
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_easy_setting.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2):


    Mã:
    <linearlayout android:orientation="vertical" android:id="@id/status_bar_easy_setting" android:background="#ff4d4d4d" android:layout_width="fill_parent" android:layout_height="wrap_content" android:splitmotionevents="false"
    phần android:background="#ff4d4d4d" mã màu các bác thay bằng #7f4d4d4d[/color] hoặc mã màu các bác thích

    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_easy_setting_scroll.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2):


    Mã:
    <linearlayout android:orientation="vertical" android:id="@id/status_bar_easy_setting" android:background="#ff575757" android:layout_width="fill_parent" android:layout_height="wrap_content" android:splitmotionevents="false"
    phần android:background="#ff575757" các bác thay bằng #7f575757[/color]

    • tiếp tới là thanh brightness panel (thanh điều chỉnh độ sáng tối màn hình):
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 15):


    Mã:
    <linearlayout android:orientation="vertical" android:id="@id/brightness_panel" android:background="#ff575757" android:layout_width="fill_parent" android:layout_height="wrap_content">
    phần android:background="#ff575757" mã màu các bác chỉnh thành #7f575757[/color] hoặc mã màu các bác thích

    • ngay phía dưới là thanh màu xanh hiển thị tiêu đề "thông báo"
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded_notification_title.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2 và 5):


    Mã:
    <relativelayout android:layout_gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/easy_setting_title_bg" android:paddingtop="2.0dip" android:paddingbottom="2.0dip" android:layout_width="fill_parent" android:layout_height="30.0dip"
    Mã:
    <textview android:textsize="16.0dip" android:textcolor="#ffffffff" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/btn_status_bar" android:paddingtop="0.0dip" android:paddingbottom="0.0dip" android:layout_width="102.0dip" android:layout_height="30.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignparentright="true" android:contentdescription="@string/accessibility_clear_all" style="?android:attr/buttonstyle" />
    phần android:background="@drawable/easy_setting_title_bg" dòng thứ 2 các bác thay thế @drawable/easy_setting_title_bg[/color] bằng mã màu [color=rgb(255, 0, 0)]#7f000000[/color] hoặc mã màu các bác thích.
    [color=rgb(20, 20, 20)]phần android:background="@drawable/btn_status_bar"[/color] là nền thanh xóa các bác thay thế bằng [color=rgb(255, 0, 0)]#7f000000[/color] hoặc mã màu các bác thích

    • thanh chiếm nhiều diện tích nhất là notification panel phía dưới (chứa các thông báo):
    [color=rgb(20, 20, 20)]đường dẫn: systemui/res/layout/status_bar_expanded.xml[/color]​
    [color=rgb(20, 20, 20)]mã gốc (dòng thứ 2):


    Mã:
    <framelayout android:id="@id/notification_panel" android:background="#ff000000" android:paddingtop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginleft="@dimen/notification_panel_margin_left"
    phần android:background="#ff000000" các bác thay mã màu bằng #7f000000[/color] hoặc mã màu các bác thích

    [color=rgb(20, 20, 20)]tham khảo thêm các hướng dẫn hữu ích khác tại đây![/color]
    hướng dẫn của bạn trên andorid jb , trên kitkat 4.4.2 có khác ...đôi lúc vừa thay code , mã màu đồng thời phải thay file ảnh nữa ...

  9. #9
    Ngày tham gia
    Mar 2014
    Bài viết
    0
    chưa hiểu lắm, dùng notepad ++ để chỉnh sửa ah bác

  10. #10
    Ngày tham gia
    Jan 2015
    Bài viết
    0
    Trích dẫn Gửi bởi like_android
    cái này bác chủ làm trên 4.1 hay 4.4 vậy?
    sao mình làm trên 4.4 vú ko có mấy code ở trên

    Trích dẫn Gửi bởi hoangphucdt
    4.4 vu2 ko gặp code theo bác chủ nhĩ.

    f200s của tui !!!!!!!!!
    vếu độc lạ nên hk đụng hàng :v nên việc mod nó cũng rất ư là khó

    sent from my lg-f400 using lg việt mobile app

Trang 1 của 2 12 CuốiCuối

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •