[Android General] grzegorz354:
Guide Next alarm lockscreen​

My Adaptation under Pie

Original guide Here

Decompile SystemUI.apk

# Add smail

# Locate to SystemUI/res/layout/keyguard_bottom_shortcut_area.xml

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.KeyguardBottomAreaShortcutView android:id="@id/keyguard_bottom_shortcut_area" android:tag="keyguardBottomArea" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layoutDirection="ltr" android:elevation="5.0dip" android:outlineProvider="none"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto">
<LinearLayout android:gravity="center|top" android:layout_gravity="bottom|center" android:orientation="vertical" android:id="@id/keyguard_indication_area" android:tag="keyguardIndicationArea" android:layout_width="fill_parent" android:layout_height="@dimen/keyguard_indication_area_height" android:layout_marginLeft="@dimen/keyguard_indication_margin_side" android:layout_marginRight="@dimen/keyguard_indication_margin_side" android:layout_marginBottom="@dimen/keyguard_indication_margin_bottom_space">
<include layout="@layout/keyguard_lock_secure_icon_view" />
<include layout="@layout/keyguard_indication_text_view" />
<com.android.systemui.statusbar.phone.KeyguardIndicationTextView android:textAppearance="?android:textAppearanceSmall" android:textStyle="italic" android:textColor="#ffffffff" android:ellipsize="end" android:gravity="center_horizontal" android:id="@id/keyguard_indication_enterprise_disclosure" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</LinearLayout>
<include layout="@layout/keyguard_bottom_shortcut_area_right" />
<include layout="@layout/keyguard_bottom_shortcut_area_left" />
<include layout="@layout/keyguard_biometric_lock_icon_view" />
<LinearLayout android:layout_gravity="bottom|center" android:orientation="vertical" android:paddingBottom="20.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content">
[COLOR="Blue"]<com.android.systemui.rz.LeftLayout android:layout_width="wrap_content" android:layout_height="wrap_content" key="next_alarm_toggle">
<com.android.keyguard.nextalarm.GetNextAlarmTimeText android:id="@id/next_alarm_txt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#7f000000" android:fontFamily="sec-roboto-light" style="@style/keyguard_text_shadow" />
</com.android.systemui.rz.LeftLayout>[/COLOR]
</LinearLayout>
<LinearLayout android:gravity="center|top" android:layout_gravity="bottom|center" android:orientation="vertical" android:id="@id/usim_text_area" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/keyguard_usim_text_area_height">
<com.android.keyguard.EmergencyButton android:textAppearance="?android:textAppearanceMedium" android:gravity="center" android:layout_gravity="center|top" android:id="@id/emergency_call_button" android:background="@drawable/theme_transparent_ripple_drawable" android:paddingLeft="@dimen/keyguard_emergency_button_inner_padding" android:paddingRight="@dimen/keyguard_emergency_button_inner_padding" android:layout_width="wrap_content" android:layout_height="@dimen/keyguard_emergency_button_height" android:text="@string/kg_lockscreen_emergency_call_button_text" sysui:originBackground="origin_transparent_ripple_drawable" sysui:originColor="origin_keyguard_message_area_text_color" sysui:originShadowColor="keyguard_text_shadow_color" sysui:themeBackground="theme_transparent_ripple_drawable" sysui:themeColor="theme_keyguard_message_area_text_color" sysui:themeShadowColor="keyguard_text_transparent_color" sysui:whitebgBackground="whitebg_transparent_ripple_drawable" sysui:whitebgColor="whitebg_keyguard_text_color" sysui:whitebgShadowColor="whitebg_keyguard_shadow_color" style="@style/keyguard_button_style" />
<ViewStub android:layout_gravity="center|top" android:id="@id/stub_keyguard_usim_text" android:layout="@layout/keyguard_usim_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/keyguard_usim_text_margin_top" />
</LinearLayout>
<ViewStub android:layout_gravity="bottom" android:id="@id/stub_keyguard_carrier_bottom_text" android:layout="@layout/keyguard_carrier_bottom_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.android.systemui.statusbar.phone.NoFindTraversalFrameLayout android:id="@id/preview_container" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.KeyguardBottomAreaShortcutView>

# Locate to SystemUI/res/ids.xml

add

# Add in drawable ic_qs_alarm_on.png

# then add 1 to the last drawable to get your id without recompile/decompile

# Locate to com/android/keyguard/nextalarm/GetNextAlarmTimeText

<public type="drawable" name="ic_qs_alarm_on" id="0x7f0807d4" />

<public type="id" name="next_alarm_txt" id="0x7f0e03df" />

# recompile/done

## RomControl

<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Next Alarm" android:key="next_alarm_toggle" android:defaultValue="true" android:summaryOn="Show" android:summaryOff="Hide" app:packageNameToKill="com.android.systemui" />

## GrxSettings

<GrxSwitchPreference android:title="Next Alarm" android:key="next_alarm_toggle" android:defaultValue="true" android:summaryOn="Show" android:summaryOff="Hide" grx:confirmKillpackage="true" grx:killpackage="com.android.systemui" />

* I found a small bug Next Alarm shows about 5 minutes earlier as in the picture