Chủ Nhật, 15 tháng 3, 2015

Chia thanh bar làm 2 dòng cho Zenfone

BƯỚC 1 : MỞ RỘNG FRAME-WORK
Nếu mod từ frame-work gốc thì phải làm như sau để đóng gói k lỗi
Bung file  framework-res.apk các bạn theo đường dẫn c:\apktool/framework-res/res/values mở file Styles.xml với notepad++ chép code này vào dòng cuối cùng rồi save lại
Mã:
<style name="StatusBarNotificationText">
        <item name="textSize">16.0sp</item>
        <item name="textColor">#ff999999</item>
    </style>
[​IMG]
Tìm tới thư mục c:\apktool\framework-res\res\values mở file dimens.xml với notepad++ tìm dòng:
Mã:
<dimen name="status_bar_height">25.0dip</dime>
các bạn chỉnh 25.0dip thành 50.0dip rồi save và đóng notepad++ lại.
Đóng gói frame-work
2.Chia thanh bar làm 2 dòng
A.Khai báo ids
Bung file SystemUI mở file res/values/ids.xml với notepad++
Thêm code sau vào vị trí như ảnh
 <item type="id" name="stt3phai">false</item>
 <item type="id" name="stt3phai1">false</item> 
 <item type="id" name="stt3phai2">false</item>
 <item type="id" name="stt3trai">false</item> 
 <item type="id" name="stt3trai1">false</item>
 <item type="id" name="stt3trai2">false</item>

B.Chia thanh bar làm 2 dòng
Chia thanh bar làm 2 dòng ở bên trái thanh stt3
NHỮNG PHẦN NÀY SẼ NẰM BÊN TRÊN THANH STT 3 TRÁI
Vào SystemUI/res/layout/asus_status_bar
Tìm code sau
 <LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="6.0dip">
....
Thêm code sau vào bên dưới nó  như ảnh ( Code dưới thụt so với code trên 4 dấu cách )
 <LinearLayout android:gravity="left" android:orientation="vertical" android:id="@id/stt3trai" android:layout_width="fill_parent" android:layout_height="50.0dip" android:layout_weight="1.0"> 
 <LinearLayout android:gravity="left|center" android:orientation="horizontal" android:id="@id/stt3trai1" android:layout_width="fill_parent" android:layout_height="25.0dip" android:layout_weight="1.0">

Chúng ta có thể đưa icon sóng+sim+wifi lên trên thanh stt-trái 3

Kết thúc stt3trái trên= code
</LinearLayout> như ảnh
Thêm code sau xuống dưới dòng </LinearLayout>  kết thúc stt 3 trái trên như ảnh
<ImageView android:paddingRight="1.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffffffff" />
            <LinearLayout android:gravity="left|center" android:orientation="horizontal" android:id="@id/stt3trai2" android:layout_width="fill_parent" android:layout_height="25.0dip" android:layout_weight="1.0">            
            </LinearLayout>

Trong đó code  <ImageView android:paddingRight="1.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffffffff" /> 
Là code chứa dòng kẻ trắng chia đôi thanh stt.Ai k thích có thể xóa đi
...
Thêm code  </LinearLayout> như ảnh
Để đóng gói stt3 trái
Vậy là xong phần bên trái
CHIA THANH STT LÀM 2 DÒNG Ở BÊN PHẢI THANH STT3
Tương tự như trên đây là code chia thanh stt 3 phải trên
<LinearLayout android:gravity="right" android:orientation="vertical" android:id="@id/stt3phai" android:layout_width="fill_parent" android:layout_height="50.0dip" android:layout_weight="1.0">
            <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/stt3phai1" android:layout_width="fill_parent" android:layout_height="25.0dip" android:layout_weight="1.0">
Lưu ý là Mở đầu là 
<LinearLayout thì kết thúc code  phải là 
</LinearLayout>
ảnh minh họa
http://upanh123.com/images/2015/03/16/44ce33.png
Tương tự như bên trên thêm code sau xuống dưới dòng 
</LinearLayout> kết thúc stt3phải trên
 <ImageView android:paddingRight="1.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffffffff" />
            <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/stt3phai2" android:layout_width="fill_parent" android:layout_height="25.0dip" android:layout_weight="1.0">
Chúng ta có thể chuyển thông báo cuộc gọi ,tin nhắn xuống dưới stt3 phải dưới như ảnh
http://upanh123.com/images/2015/03/16/d3fdc8.png

Đây là file đã chia sẵn code 2 dòng của mình mọi người có thể giải nén ra để lấy nó làm mẫu 
http://taptin.vn/99112

Không có nhận xét nào:

Đăng nhận xét