(GUIDE)(MOD)Paged Lockscreen like on 4.2+ (NEW)(GB+)

Search This thread

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
How to add PagedView to lockscreen.

As most of you all know the android 4.2+ has implemented an awesome new Lockscreen on wich u can swipe pages to show widgets and such.
Currently i have managed to create working pageview but for now without Widgets.
However you can add some custom stuff though ;).
i had added DigitalClok -> AnalogClock -> Device Info.
but you would be able to change it like what you want ;) as you can add unlimited LinearLayouts for adding new views.

Ac3FGPk8
aFVYrg3i
AlCUOs6m
Screenshot_2014-02-16-22-31-39.png



Basicly this mod is very easy to add.
What is inside the resources.zip ?

  1. SwipeLock Smalis for Framework.jar

Basicly what you would need to do is:
  1. Download Resources Attachement.
  2. Extract it
  3. Decompile you’re framework.jar
  4. Go to the extract smali folder from the resources.zip and copy the smali folder to the smali folder of you’re framework.jar.
  5. Compile framework.jar
  6. Now we are going to add it to the frameworks location/allocate the text.
  7. Decompile framework-res.apk
  8. Find a lockscreen layout to you’re likes. (“zzz_keyguard_screen_clockwidget.xml” <- on this one i have NOT tested as in my test app when i used a Lockscreen overlay i couldnt swipe the pages so its likely this one not works but on the GB ones it does ;)
  9. so instead i used “keyguard_screen_tab_unlock.xml” ofcourse you would be able to add this in other lock layouts aswell.
  10. Open the layout you wanted and simply add this line above the clock layout or where you want
    I put this code above my clock code ( i setted minheight to 300.0dip so u would be able to swipe it at this height)
    Code:
    <com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">
    And below you're clock layout
    Code:
    </com.spacecaker.swipelock.ui.SwipeView>
  11. So now we have that now we need to put the clock layout inside a LinearLayout
  12. Like this
    Code:
    		<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
    [COLOR="Magenta"]			<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
    				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
    				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
    			</com.android.internal.widget.DigitalClock>[/COLOR]
    		</LinearLayout>
  13. So it would end up looking like this:
    Code:
    	<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">	        
    		<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
    			<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
    				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
    				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
    			</com.android.internal.widget.DigitalClock>
    		</LinearLayout>
    	</com.spacecaker.swipelock.ui.SwipeView>
  14. Now we add another LinearLayout for you're second Page ;) i used the universal AnalogClock like this
    Code:
    <AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
  15. So now we again add a LinearLayout so it ends up looking like this:
    Code:
    		<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
    			[COLOR="Magenta"]<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />[/COLOR]
    		</LinearLayout>
  16. The end Layout would look like something like this:
    Code:
    	<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">	        
    		<LinearLayout android:orientation="vertical" android:minHeight="400.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
    			<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
    				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
    				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
    			</com.android.internal.widget.DigitalClock>
    		</LinearLayout>
    		<LinearLayout android:orientation="vertical" android:minHeight="400.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
    			<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
    		</LinearLayout>		
    	</com.spacecaker.swipelock.ui.SwipeView>
  17. To Add More pages just add another LinearLayout with something inside ;)
  18. Now Compile framework-res.apk
  19. Now zip the files together and make sure these are set properly.
  20. framework-res.apk inside /system/framework/**
  21. And then ofcourse you’re modified framework.jar inside /system/framework/**
  22. Now you are done ;)
  23. Happy modding ;)

On what roms can u apply this mod ?

Basicly it can be applied to ALL Roms ;) atleast if u know what u are doing.


If you wanna see how i moddified mine take a look here https://github.com/spacecaker/git_status_xp/commit/f85c304142f577e3a933a60ef3d61cbb2c0e89ac
That shows u what changes i did ;) ^^ its on GingerBread SlidingTab Lockscreen just added it for making it look bit easier.
 

Attachments

  • resources.zip
    12.5 KB · Views: 258

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
A list of helper,idea givers,and such
  • RomanBB
  • Pineapleowl
  • Mariozawa
  • BroadComCM
  • SpaceCaker

Sources? Yes We have!
https://github.com/spacecaker/SwipeLock

Try it without Modding?
Yes you can ;)
In the Screenshots i had used HoloLocker as an example :p
So you can try it on you"re phone aswell
Note: the minheight might be to much for low res phones so i am sorry if the layout is cut.
 

Attachments

  • locker.apk
    329.7 KB · Views: 198
Last edited:

Fissleboot

Senior Member
May 1, 2014
87
26
nice work :) could u reference a installed apps widget??? would like to add chronus digital with weather

Edit: is their a way to make it stay on whatever screen u swipe to after locking??
 
Last edited:

G.M.L

Senior Member
May 3, 2013
1,411
2,177
46
Greece/Thessaloniki
pasakalis.blogspot.gr
great tutorial!!!!!!one little help if you want this is is my keyguard_screen_tab_unlock its from ICS rom can you add in this analog clock and device info to make one little start and to see where to put layouts and then i will add other layout if i want thanks!!!!!
(i was rename xml in txt to upload it)
 

Attachments

  • keyguard_screen_tab_unlock.txt
    9.6 KB · Views: 19

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    How to add PagedView to lockscreen.

    As most of you all know the android 4.2+ has implemented an awesome new Lockscreen on wich u can swipe pages to show widgets and such.
    Currently i have managed to create working pageview but for now without Widgets.
    However you can add some custom stuff though ;).
    i had added DigitalClok -> AnalogClock -> Device Info.
    but you would be able to change it like what you want ;) as you can add unlimited LinearLayouts for adding new views.

    Ac3FGPk8
    aFVYrg3i
    AlCUOs6m
    Screenshot_2014-02-16-22-31-39.png



    Basicly this mod is very easy to add.
    What is inside the resources.zip ?

    1. SwipeLock Smalis for Framework.jar

    Basicly what you would need to do is:
    1. Download Resources Attachement.
    2. Extract it
    3. Decompile you’re framework.jar
    4. Go to the extract smali folder from the resources.zip and copy the smali folder to the smali folder of you’re framework.jar.
    5. Compile framework.jar
    6. Now we are going to add it to the frameworks location/allocate the text.
    7. Decompile framework-res.apk
    8. Find a lockscreen layout to you’re likes. (“zzz_keyguard_screen_clockwidget.xml” <- on this one i have NOT tested as in my test app when i used a Lockscreen overlay i couldnt swipe the pages so its likely this one not works but on the GB ones it does ;)
    9. so instead i used “keyguard_screen_tab_unlock.xml” ofcourse you would be able to add this in other lock layouts aswell.
    10. Open the layout you wanted and simply add this line above the clock layout or where you want
      I put this code above my clock code ( i setted minheight to 300.0dip so u would be able to swipe it at this height)
      Code:
      <com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">
      And below you're clock layout
      Code:
      </com.spacecaker.swipelock.ui.SwipeView>
    11. So now we have that now we need to put the clock layout inside a LinearLayout
    12. Like this
      Code:
      		<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
      [COLOR="Magenta"]			<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
      				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
      				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
      			</com.android.internal.widget.DigitalClock>[/COLOR]
      		</LinearLayout>
    13. So it would end up looking like this:
      Code:
      	<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">	        
      		<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
      			<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
      				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
      				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
      			</com.android.internal.widget.DigitalClock>
      		</LinearLayout>
      	</com.spacecaker.swipelock.ui.SwipeView>
    14. Now we add another LinearLayout for you're second Page ;) i used the universal AnalogClock like this
      Code:
      <AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
    15. So now we again add a LinearLayout so it ends up looking like this:
      Code:
      		<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
      			[COLOR="Magenta"]<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />[/COLOR]
      		</LinearLayout>
    16. The end Layout would look like something like this:
      Code:
      	<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">	        
      		<LinearLayout android:orientation="vertical" android:minHeight="400.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
      			<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
      				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
      				<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
      			</com.android.internal.widget.DigitalClock>
      		</LinearLayout>
      		<LinearLayout android:orientation="vertical" android:minHeight="400.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
      			<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
      		</LinearLayout>		
      	</com.spacecaker.swipelock.ui.SwipeView>
    17. To Add More pages just add another LinearLayout with something inside ;)
    18. Now Compile framework-res.apk
    19. Now zip the files together and make sure these are set properly.
    20. framework-res.apk inside /system/framework/**
    21. And then ofcourse you’re modified framework.jar inside /system/framework/**
    22. Now you are done ;)
    23. Happy modding ;)

    On what roms can u apply this mod ?

    Basicly it can be applied to ALL Roms ;) atleast if u know what u are doing.


    If you wanna see how i moddified mine take a look here https://github.com/spacecaker/git_status_xp/commit/f85c304142f577e3a933a60ef3d61cbb2c0e89ac
    That shows u what changes i did ;) ^^ its on GingerBread SlidingTab Lockscreen just added it for making it look bit easier.
    5
    A list of helper,idea givers,and such
    • RomanBB
    • Pineapleowl
    • Mariozawa
    • BroadComCM
    • SpaceCaker

    Sources? Yes We have!
    https://github.com/spacecaker/SwipeLock

    Try it without Modding?
    Yes you can ;)
    In the Screenshots i had used HoloLocker as an example :p
    So you can try it on you"re phone aswell
    Note: the minheight might be to much for low res phones so i am sorry if the layout is cut.