들레아빠
14.04.29
조회 수 5331
추천 수 11
댓글 2

갤럭시 노트 3 상단바를 기준으로 설명합니다.


SystemUI.apkreslayoutstatus_bar.xml에서

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/system_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

이 다음에

    <LinearLayout android:gravity="left" android:orientation="horizontal" android:id="@id/nav_buttons" android:focusable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" >
        <com.android.systemui.statusbar.policy.KeyButtonView android:layout_width="50.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" systemui:keyCode="82" systemui:keyRepeat="false" />
    </LinearLayout>
    <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/nav_buttons" android:focusable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" >
        <com.android.systemui.statusbar.policy.KeyButtonView android:layout_width="150.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" systemui:keyCode="26" systemui:keyRepeat="false" />
    </LinearLayout>
    <LinearLayout android:gravity="right" android:orientation="horizontal" android:id="@id/nav_buttons" android:focusable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" >
        <com.android.systemui.statusbar.policy.KeyButtonView android:layout_width="50.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" systemui:keyCode="4" systemui:keyRepeat="false" />
    </LinearLayout>

이 코드를 추가하면 좌측은 메뉴키, 중앙은 전원키, 오른쪽은 뒤로가기 키가 작동됩니다.

눈에는 보이지 않지만 layout_width영역에 터치하면 동작됨.

컴파일후 투척.. 

댓글 2
댓글 쓰기 권한이 없습니다.
정렬 목록 검색 쓰기
등록된 글이 없습니다.
1 - 2