Find The Best Apps With Google’s Picks & Other Tricks

The Google Play Store, weighing in with more than 1.4 million apps at last … more

Dynamic Pop for Note 4 (N910T & 910W8)

With the release of the Canadian Lollipop ROM for the Note 4, T-Mobile users can also enjoy the … more

Sunday Debate: Better to Buy Older or Newer Hardware?

Join us in a fun Sunday Debate on New vs. Old. Come with your opinions and feel … more

HTC Sense Camera & Gallery for M8 GPE Lollipop

If you are running a GPE ROM and miss the sense gallery and camera, this flashable zip by … more
Post Reply Subscribe to Thread Email Thread

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

16th February 2014, 10:01 PM |#1  
SpaceCaker's Avatar
OP Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,893
 
13,431 posts
Join Date:Joined: Mar 2011
More
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.




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">
    			<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>
  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">
    			<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
    		</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_st...d61cbb2c0e89ac
That shows u what changes i did ^^ its on GingerBread SlidingTab Lockscreen just added it for making it look bit easier.
Attached Files
File Type: zip resources.zip - [Click for QR Code] (12.5 KB, 224 views)
The Following 11 Users Say Thank You to SpaceCaker For This Useful Post: [ View ]
 
 
16th February 2014, 10:01 PM |#2  
SpaceCaker's Avatar
OP Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,893
 
13,431 posts
Join Date:Joined: Mar 2011
More
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
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.
Attached Files
File Type: apk locker.apk - [Click for QR Code] (329.7 KB, 169 views)
Last edited by SpaceCaker; 16th February 2014 at 10:23 PM.
The Following 4 Users Say Thank You to SpaceCaker For This Useful Post: [ View ]
27th February 2014, 01:14 PM |#3  
Denz Juand's Avatar
Junior Member
Flag Banjarmasin
Thanks Meter: 25
 
28 posts
Join Date:Joined: Feb 2014
awesome sir
26th August 2014, 05:15 PM |#4  
brittnearl's Avatar
Member
Thanks Meter: 22
 
78 posts
Join Date:Joined: May 2014
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 by brittnearl; 27th August 2014 at 02:02 AM.
30th August 2014, 02:36 PM |#5  
Viper The Ripper's Avatar
Recognized Contributor
Thanks Meter: 950
 
2,014 posts
Join Date:Joined: Nov 2012
Great tutorial Space!
1st January 2015, 05:30 PM |#6  
G.M.L's Avatar
Senior Member
Flag Thessaloniki
Thanks Meter: 132
 
603 posts
Join Date:Joined: May 2013
More
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)
Attached Files
File Type: txt keyguard_screen_tab_unlock.txt - [Click for QR Code] (9.6 KB, 14 views)
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes