Android lock screen design

Source: Internet
Author: User

I. Main Ideas

1. Use the GridView control to display the following information to implement screen lock thumbnail preview.

2. Read lock screen data from the settings. db database of the Data System

3. Use Image merging to display the Image Selection Effect

Effect

 
 

 

Ii. resource storage

Image: screen lock style preview thumbnails stored in drawable Resources

Data: Mainly reads the System table in the settings. db database.

Iii. Important data description

Integer array previewImage storage image resource ID

The integer array lockstyle_nameid stores the lock screen string.

PreviewBitmap

Image array previewSelectBitmap storage preview selected Image

String Array lockType stores the field names in the setting. db database table

ArrayList <HashMap <String, Object> listItems is an array list. Its list items are HashMap. Each HashMap stores two important data items: the image to be displayed, and the string corresponding to the image.

Iv. Important Methods

InitData ()

Main function: Initialize data. Initialize the original preview Image array, initialize the selected array, initialize the ArrayList array list, and obtain the currently selected items from the database.

Docomo (Bitmap src, Bitmap watermark)

Main function: combines the original preview image with the selected image and returns the final selected image.

Parameter: src: Original Image

Watermark: The image to be merged into the original image.

Returned value: Bitmap

InitSelectState ()

Main function: update the selected data to the selected data.

SaveSetting ()

Main function: Save settings to Database system

GetSetting ()

Main function: Get settings from the Database system

SaveSecureSetting ()

Main function: Save the settings to the Database Secure

GetSecureSettings ()

Main function: Get settings from Database Secure

V. system diagram


System diagram

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.