I know that already some applications can do this, for example:
Widgetlocker lockscreen
Flyscreen
I want to know how to do this in my application? What classes can I use? Or what articles should I read? I do not want to change the source code of Android.
And I wonder if it will deal with when the screen is locked by a drawing pattern?
Take a look at this answer . You need to write your own application for the home screen, in which the lockscreen behavior will be implemented. There is sample code for writing your own home screen in the Android SDK.