通知領域に輝度調節スライダーを追加

この記事の賞味期限は切れています。掲載内容や情報が古い可能性があります。

通知領域に輝度を調整するスライダーを追加します。
SamSony’aにあったのでsmaliをそのまま持ってくるだけの手抜きお手軽Modです。

まず、ここから必要なsmaliとxmlをダウンロードしてください。
zipを解凍したらsmaliフォルダとresフォルダをデコンパイルした
SystemUI.apkフォルダにコピーしてください。

次に、追加したリソースをpublic.xmlに追加します。
SystemUI.apk\res\values\public.xml

<public type=”drawable” name=”qp_brightness_bg” id=”0x7f02010a” />
<public type=”drawable” name=”qp_brightness_max” id=”0x7f02010b” />
<public type=”drawable” name=”qp_brightness_min” id=”0x7f02010c” />
<public type=”layout” name=”qp_brightness” id=”0x7f030026″ />
を追加します。
IDは変動するのでExcelなどでどのIDにすればいいかを調べてください。
例: <public type=”layout” name=”system_bar_ticker_panel” id=”0x7f030029″ />が
type=”layout”のidの最後ならqp_brightnessのIDを0x7f03002aにする

追記した後は
SystemUI.apk\res\layout\status_bar_expanded_header.xml
を開き、

<LinearLayout android:gravity=”center_vertical” android:orientation=”horizontal” android:background=”#00000000″ android:layout_width=”fill_parent” android:layout_height=”52.0dip” android:baselineAligned=”false”>
        <com.android.systemui.statusbar.policy.Clock android:textAppearance=”@style/TextAppearance.StatusBar.Expanded.Clock” android:id=”@id/clock_expanded” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_marginLeft=”8.0dip” android:singleLine=”true” />
        <com.android.systemui.statusbar.RotationToggle android:id=”@id/rotation_lock_button” android:clickable=”true” android:layout_width=”32.0dip” android:layout_height=”32.0dip” android:layout_margin=”8.0dip” android:button=”@drawable/ic_notify_rotation” android:contentDescription=”@string/accessibility_rotation_lock_off” />
        <ImageView android:id=”@id/settings_button” android:layout_width=”48.0dip” android:layout_height=”48.0dip” android:src=”@drawable/ic_notify_quicksettings” android:scaleType=”center” android:contentDescription=”@string/accessibility_settings_button” />
        <Space android:layout_width=”0.0dip” android:layout_height=”0.0dip” android:layout_weight=”1.0″ />
        <Button android:id=”@id/clear_all_button” android:background=”#00000000″ android:paddingLeft=”8.0dip” android:paddingRight=”8.0dip” android:layout_width=”106.0dip” android:layout_height=”wrap_content” android:text=”@string/status_bar_clear_all_button” android:layout_alignParentRight=”true” android:contentDescription=”@string/accessibility_clear_all” />
    </LinearLayout>

を切り取って
SystemUI.apk\res\layout\status_bar_expanded.xml

<include android:layout_width=”fill_parent” android:layout_height=”@dimen/notification_panel_header_height” layout=”@layout/status_bar_expanded_header” />

の次に貼り付けてください。

そして
SystemUI.apk\res\layout\status_bar_expanded_header.xmlに戻り、

<include layout=”@layout/qp_brightness” />


<View android:background=”@drawable/status_bar_hr” android:layout_width=”fill_parent” android:layout_height=”2.0dip”/>

の前に貼り付けてください。

これでコンパイルすれば完了です。
.333用のSystemUI.apkはここからダウンロードできます。

はてブ Pocket Mastodon タイトルとURLをコピー
カテゴリ:

技適の無い機器の使用は自己責任です。
中国版デバイスは日本語に対応していないものが多いため、ADBコマンドでの日本語化が必要です。
root化済み・非rootそれぞれのやり方はこちらの記事を参考にしてください。