Android 短信加密,联系人字母侧边栏定位,不同层级的Android开发者的不同行为

// return super.onOptionsItemSelected(item);

break;

}

return true;

}

// zj actionBar menu end

public void zjForgetPwd(View v) {

Intent intent = new Intent(this,

com.android.mms.ui.MmsLockResetPwd.class);

startActivity(intent);

}

}

加密短信的DbHelper:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import java.util.ArrayList;

import java.util.List;

import android.content.ContentValues;

import android.content.Context;

import android.database.Cursor;

import android.database.sqlite.SQLiteDatabase;

import android.database.sqlite.SQLiteOpenHelper;

public class MmsLockMsgDbHelper extends SQLiteOpenHelper {

private static final int DATABASE_VERSION = 3;

private static final String DATABASE_NAME = “zj_msg”;

private static final String NOTE_TABLE_NAME = “msg”;

private static final String NOTE_COL_ID = “_id”;

private static final String NOTE_COL_THREAD_ID = “thread_id”;

private static final String NOTE_COL_ADDRESS = “address”;

private static final String NOTE_COL_DATE = “date”;

private static final String NOTE_COL_TYPE = “type”;

private static final String NOTE_COL_BODY = “body”;

private static final String NOTE_COL_NAME = “name”;

private static final String[] NOTE_COL_PROJECTION = new String[] {

NOTE_COL_ID, NOTE_COL_THREAD_ID, NOTE_COL_ADDRESS, NOTE_COL_DATE,

NOTE_COL_TYPE, NOTE_COL_BODY, NOTE_COL_NAME };

public MmsLockMsgDbHelper(Context context) {

super(context, DATABASE_NAME, null, DATABASE_VERSION);

}

// Create table

@Override

public void onCreate(SQLiteDatabase db) {

String createNOTETableSql = “CREATE TABLE " + NOTE_TABLE_NAME + " (”

  • NOTE_COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"

  • NOTE_COL_THREAD_ID + " INTEGER," + NOTE_COL_ADDRESS

  • " INTEGER," + NOTE_COL_DATE + " INTEGER," + NOTE_COL_TYPE

  • " INTEGER," + NOTE_COL_BODY + " TEXT," + NOTE_COL_NAME

  • " TEXT" + “);”;

db.execSQL(createNOTETableSql);

}

@Override

public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

// Drop older table if existed

db.execSQL("DROP TABLE IF EXISTS " + NOTE_TABLE_NAME);

// Create tables again

onCreate(db);

}

// Add new Msg

public int addMsg(MmsLockMsg Msg) {

SQLiteDatabase db = this.getWritableDatabase();

ContentValues values = new ContentValues();

values.put(NOTE_COL_THREAD_ID, Msg.getThreadId());

values.put(NOTE_COL_ADDRESS, Msg.getAddress());

values.put(NOTE_COL_DATE, Msg.getDate());

values.put(NOTE_COL_TYPE, Msg.getType());

values.put(NOTE_COL_BODY, Msg.getBody());

values.put(NOTE_COL_NAME,Msg.getName());

// Insert to database

long rowId = db.insert(NOTE_TABLE_NAME, null, values);

// Close the database

db.close();

return (int) rowId;

}

// Get one NOTE

public MmsLockMsg getMsg(int id) {

SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.query(NOTE_TABLE_NAME, NOTE_COL_PROJECTION,

NOTE_COL_ID + “=?”, new String[] { String.valueOf(id) }, null,

null, null, null);

if (cursor != null)

cursor.moveToFirst();

MmsLockMsg msg = new MmsLockMsg(cursor.getInt(0), cursor.getInt(1),

cursor.getLong(2), cursor.getLong(3), cursor.getInt(4),

cursor.getString(5),cursor.getString(6));

return msg;

}

public int getThreadIdById(int id) {

SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.query(NOTE_TABLE_NAME, NOTE_COL_PROJECTION,

NOTE_COL_ID + “=?”, new String[] { String.valueOf(id) }, null,

null, null, null);

if (cursor != null)

cursor.moveToFirst();

int threadId = cursor.getInt(1);

return threadId;

}

// Get all Msg

public List getAllMsg() {

List MsgList = new ArrayList();

String selectQuery = "SELECT * FROM " + NOTE_TABLE_NAME;

SQLiteDatabase db = this.getWritableDatabase();

Cursor cursor = db.rawQuery(selectQuery, null);

// looping through all rows and adding to list

if (cursor.moveToFirst()) {

do {

MmsLockMsg Msg = new MmsLockMsg(cursor.getInt(0),

cursor.getInt(1), cursor.getLong(2), cursor.getLong(3),

cursor.getInt(4), cursor.getString(5),cursor.getString(6));

MsgList.add(Msg);

} while (cursor.moveToNext());

}

// return contact list

return MsgList;

}

public Cursor getAllMsgCursor() {

String selectQuery = "SELECT * FROM " + NOTE_TABLE_NAME;

SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.rawQuery(selectQuery, null);

return cursor;

}

public Cursor getAllMsgCursorGroupByThreadId() {

String selectQuery = “SELECT * FROM msg WHERE _id in (select min(_id)from msg group by thread_id)”;

SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.rawQuery(selectQuery, null);

return cursor;

}

// 更改电话号码为联系人名字,若存在

// public Cursor

public Cursor getAllMsgByThreadId(int threadId) {

String selectQuery = “SELECT * FROM msg WHERE thread_id =” + threadId

  • " order by date";

SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.rawQuery(selectQuery, null);

return cursor;

}

public int updateMsg(MmsLockMsg msg) {

SQLiteDatabase db = this.getWritableDatabase();

ContentValues values = new ContentValues();

values.put(NOTE_COL_THREAD_ID, msg.getThreadId());

values.put(NOTE_COL_ADDRESS, msg.getAddress());

values.put(NOTE_COL_DATE, msg.getDate());

values.put(NOTE_COL_TYPE, msg.getType());

values.put(NOTE_COL_BODY, msg.getBody());

values.put(NOTE_COL_NAME, msg.getName());

return db.update(NOTE_TABLE_NAME, values, NOTE_COL_ID + “=?”,

new String[] { String.valueOf(msg.getId()) });

}

public void deleteMsg(int id) {

SQLiteDatabase db = this.getWritableDatabase();

db.delete(NOTE_TABLE_NAME, NOTE_COL_ID + “=?”,

new String[] { String.valueOf(id) });

db.close();

}

public void deleteMsgByThreadId(int threadId) { // NOTE_COL_ID改为NOTE_COL_THREAD_ID

SQLiteDatabase db = this.getWritableDatabase();

db.delete(NOTE_TABLE_NAME, NOTE_COL_THREAD_ID + “=?”,

new String[] { String.valueOf(threadId) });

db.close();

}

public void deleteAllMsg() {

SQLiteDatabase db = this.getWritableDatabase();

db.delete(NOTE_TABLE_NAME, null, null);

db.close();

}

}

文件有些多,今天就先到这儿吧,明天再续。有不明白的地方欢迎交流。

洗衣机坏了,有时候按一会儿就可以启动了,今天怎么弄都没效果,大概是启动电容的问题吧,悲剧。

下午去看公司部门间的球赛,我们队再胜一局,维持不败战绩,作为拉拉队员还是很开心的。

今天接着昨天的内容开始~

哎呀,代码在公司,明天再补充。先去学习。

Mms类:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

public class MmsLockMsg {

int _id;

int thread_id; // 号码区分标识

long address; // 号码

long date; // 日期

int type;//信息类型

// long date_sent; // 发送日期

String body; // 短信内容

String name;

public MmsLockMsg(int id, int thread_id, long address, long date,int type,String body,String name) {

this._id = id;

this.thread_id = thread_id;

this.address = address;

this.date = date;

this.type =type;

this.body = body;

this.name = name;

}

public MmsLockMsg(int thread_id, long address, long date,int type, String body,String name) {

this.thread_id = thread_id;

this.address = address;

this.date = date;

this.type =type;

this.body = body;

this.name = name;

}

public int getId() {

return _id;

}

public int getThreadId() {

return thread_id;

}

public void setThreadId(int thread_id) {

this.thread_id = thread_id;

}

public long getAddress() {

return address;

}

public void setAddress(long address) {

this.address = address;

}

public long getDate() {

return date;

}

public void setDate(long date) {

this.date = date;

}

public int getType(){

return type;

}

public void setType(int type){

this.type=type;

}

public String getBody() {

return body;

}

public void setBody(String body) {

this.body = body;

}

public String getName(){

return name;

}

public void setName(String name){

this.name = name;

}

}

设置手势密码页:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import android.app.Activity;

import android.content.Context;

import android.content.Intent;

import android.content.SharedPreferences;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Canvas;

import android.graphics.Color;

import android.graphics.Paint;

import android.graphics.Paint.Style;

import android.graphics.Typeface;

import android.graphics.Paint.Cap;

import android.util.AttributeSet;

import android.view.MotionEvent;

import android.view.View;

import android.widget.TextView;

public class MmsLockSetPwd extends View {

TextView tv_forget_pwd = (TextView)findViewById(com.android.mms.R.id.zj_lock_forget_pwd);

Paint linePaint = new Paint();

Paint whiteLinePaint = new Paint();

Paint textPaint = new Paint();

Bitmap defaultBitmap = BitmapFactory.decodeResource(getResources(),

com.android.mms.R.drawable.lock);

int defaultBitmapRadius = defaultBitmap.getWidth() / 2;

Bitmap selectedBitmap = BitmapFactory.decodeResource(getResources(),

com.android.mms.R.drawable.indicator_lock_area);

int selectedBitmapDiameter = selectedBitmap.getWidth();

int selectedBitmapRadius = selectedBitmapDiameter / 2;

PointInfo[] points = new PointInfo[9];

PointInfo startPoint = null;

int width, height;

int moveX, moveY;

boolean isUp = false;

Context ctx;

StringBuffer lockString = new StringBuffer();

public MmsLockSetPwd(Context context) {

super(context);

ctx = context;

// this.setBackgroundColor(Color.WHITE);

initPaint();

}

public MmsLockSetPwd(Context context, AttributeSet attrs) {

super(context, attrs);

// this.setBackgroundColor(Color.WHITE);

tv_forget_pwd.setVisibility(View.GONE); //zj add

initPaint();

}

@Override

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

width = getWidth();

height = getHeight();

if (width != 0 && height != 0) {

initPoints(points);

}

super.onMeasure(widthMeasureSpec, heightMeasureSpec);

}

@Override

protected void onLayout(boolean changed, int left, int top, int right,

int bottom) {

super.onLayout(changed, left, top, right, bottom);

}

private int startX = 0, startY = 0;

@Override

protected void onDraw(Canvas canvas) {

// canvas.drawText(“passwd:” + lockString, 0, 40, textPaint);

if (moveX != 0 && moveY != 0 && startX != 0 && startY != 0) {

// drawLine(canvas, startX, startY, moveX, moveY);

}

drawNinePoint(canvas);

super.onDraw(canvas);

}

@Override

public boolean onTouchEvent(MotionEvent event) {

boolean flag = true;

if (isUp) {

finishDraw();

flag = false;

} else {

handlingEvent(event);

flag = true;

}

return flag;

}

private void handlingEvent(MotionEvent event) {

switch (event.getAction()) {

case MotionEvent.ACTION_MOVE:

moveX = (int) event.getX();

moveY = (int) event.getY();

for (PointInfo temp : points) {

if (temp.isInMyPlace(moveX, moveY)

&& temp.isSelected() == false) {

temp.setSelected(true);

startX = temp.getCenterX();

startY = temp.getCenterY();

int len = lockString.length();

if (len != 0) {

int preId = lockString.charAt(len - 1) - 48;

points[preId].setNextId(temp.getId());

}

lockString.append(temp.getId());

break;

}

}

invalidate(0, height - width, width, height);

break;

case MotionEvent.ACTION_DOWN:

int downX = (int) event.getX();

int downY = (int) event.getY();

for (PointInfo temp : points) {

if (temp.isInMyPlace(downX, downY)) {

temp.setSelected(true);

startPoint = temp;

startX = temp.getCenterX();

startY = temp.getCenterY();

lockString.append(temp.getId());

break;

}

}

invalidate(0, height - width, width, height);

break;

case MotionEvent.ACTION_UP:

startX = startY = moveX = moveY = 0;

isUp = true;

invalidate();

savePwd();

break;

default:

break;

}

}

private void finishDraw() {

for (PointInfo temp : points) {

temp.setSelected(false);

temp.setNextId(temp.getId());

}

lockString.delete(0, lockString.length());

isUp = false;

invalidate();

}

private void initPoints(PointInfo[] points) {

int len = points.length;

int seletedSpacing = (width - selectedBitmapDiameter * 3) / 4;

int seletedX = seletedSpacing;

int seletedY = height - width + seletedSpacing;

int defaultX = seletedX + selectedBitmapRadius - defaultBitmapRadius;

int defaultY = seletedY + selectedBitmapRadius - defaultBitmapRadius;

for (int i = 0; i < len; i++) {

if (i == 3 || i == 6) {

seletedX = seletedSpacing;

seletedY += selectedBitmapDiameter + seletedSpacing;

defaultX = seletedX + selectedBitmapRadius

  • defaultBitmapRadius;

defaultY += selectedBitmapDiameter + seletedSpacing;

}

points[i] = new PointInfo(i, defaultX, defaultY, seletedX, seletedY);

seletedX += selectedBitmapDiameter + seletedSpacing;

defaultX += selectedBitmapDiameter + seletedSpacing;

}

}

private void initPaint() {

initLinePaint(linePaint);

initTextPaint(textPaint);

initWhiteLinePaint(whiteLinePaint);

}

/**

  • @param paint

*/

private void initTextPaint(Paint paint) {

textPaint.setTextSize(30);

textPaint.setAntiAlias(true);

textPaint.setTypeface(Typeface.MONOSPACE);

}

/**

  • @param paint

*/

private void initLinePaint(Paint paint) {

//paint.setColor(Color.GRAY);

paint.setColor(Color.parseColor(“#1E90FF”));

//paint.setStyle(Style.STROKE);

paint.setStyle(Style.FILL);

paint.setStrokeWidth(10);

paint.setAntiAlias(true);

paint.setStrokeCap(Cap.ROUND);

}

/**

  • @param paint

*/

private void initWhiteLinePaint(Paint paint) {

//paint.setColor(Color.WHITE);

paint.setColor(Color.parseColor(“#1E90FF”));

paint.setStrokeWidth(8);

paint.setAntiAlias(true);

paint.setStrokeCap(Cap.ROUND);

}

/**

  • @param canvas

*/

private void drawNinePoint(Canvas canvas) {

if (startPoint != null) {

drawEachLine(canvas, startPoint);

}

for (PointInfo pointInfo : points) {

if (pointInfo != null) {

if (pointInfo.isSelected()) {

canvas.drawBitmap(selectedBitmap, pointInfo.getSeletedX(),

pointInfo.getSeletedY(), null);

}else{ // zj add

canvas.drawBitmap(defaultBitmap, pointInfo.getDefaultX(),

pointInfo.getDefaultY(), null);

}

}

}

}

/**

  • @param canvas

  • @param point

*/

private void drawEachLine(Canvas canvas, PointInfo point) {

if (point.hasNextId()) {

int n = point.getNextId();

drawLine(canvas, point.getCenterX(), point.getCenterY(),

points[n].getCenterX(), points[n].getCenterY());

drawEachLine(canvas, points[n]);

}

}

/**

  • @param canvas

  • @param startX

  • @param startY

  • @param stopX

  • @param stopY

*/

private void drawLine(Canvas canvas, float startX, float startY,

float stopX, float stopY) {

canvas.drawLine(startX, startY, stopX, stopY, linePaint);

canvas.drawLine(startX, startY, stopX, stopY, whiteLinePaint);

}

/**

  • @author zkwlx

*/

private class PointInfo {

private int id;

private int nextId;

private boolean selected;

private int defaultX;

private int defaultY;

private int seletedX;

private int seletedY;

public PointInfo(int id, int defaultX, int defaultY, int seletedX,

int seletedY) {

this.id = id;

this.nextId = id;

this.defaultX = defaultX;

this.defaultY = defaultY;

this.seletedX = seletedX;

this.seletedY = seletedY;

}

public boolean isSelected() {

return selected;

}

public void setSelected(boolean selected) {

this.selected = selected;

}

public int getId() {

return id;

}

public int getDefaultX() {

return defaultX;

}

public int getDefaultY() {

return defaultY;

}

public int getSeletedX() {

return seletedX;

}

public int getSeletedY() {

return seletedY;

}

public int getCenterX() {

return seletedX + selectedBitmapRadius;

}

public int getCenterY() {

return seletedY + selectedBitmapRadius;

}

public boolean hasNextId() {

return nextId != id;

}

public int getNextId() {

return nextId;

}

public void setNextId(int nextId) {

this.nextId = nextId;

}

/**

  • @param x

  • @param y

*/

public boolean isInMyPlace(int x, int y) {

boolean inX = x > seletedX

&& x < (seletedX + selectedBitmapDiameter);

boolean inY = y > seletedY

&& y < (seletedY + selectedBitmapDiameter);

return (inX && inY);

}

}

public String getPwd() {

return lockString.toString();

}

public void savePwd() {

Intent intent = new Intent();

SharedPreferences shareDate = ctx.getSharedPreferences(“GUE_PWD”, 0);

boolean isSetFirst = shareDate.getBoolean(“IS_SET_FIRST”, false);

if (isSetFirst) {

String pwd = this.getPwd();

String first_pwd = shareDate.getString(“FIRST_PWD”, “HAVE NO PWD”);

if (pwd.equals(first_pwd)) {

shareDate.edit().clear().commit();

shareDate.edit().putBoolean(“IS_SET”, true).commit();

shareDate.edit().putString(“GUE_PWD”, pwd).commit();

intent.setClass(ctx, MmsLockSetPwdOk.class);

} else {

shareDate.edit().putBoolean(“SECOND_ERROR”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

} else {

shareDate.edit().clear().commit();

shareDate.edit().putString(“FIRST_PWD”, this.getPwd()).commit();

shareDate.edit().putBoolean(“IS_SET_FIRST”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

ctx.startActivity(intent);

((Activity) ctx).finish();

}

}

手势密码设置成功后,让用户输入字符密保,以防遗忘手势密码:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import android.app.Activity;

import android.content.SharedPreferences;

import android.content.SharedPreferences.Editor;

import android.os.Bundle;

import android.view.View;

import android.view.Window;

import android.widget.EditText;

import android.widget.TextView;

import android.widget.Toast;

public class MmsLockSetPwdOk extends Activity {

//private TextView showInfo;

private EditText secondPwd;

@Override

protected void onCreate(Bundle savedInstanceState) {

// TODO Auto-generated method stub

super.onCreate(savedInstanceState);

//this.requestWindowFeature(Window.FEATURE_NO_TITLE);

setContentView(com.android.mms.R.layout.mms_lock_res);

//showInfo = (TextView)findViewById(com.android.mms.R.id.res_info);

//SharedPreferences shareDate = getSharedPreferences(“GUE_PWD”, 0);

//String pwd = shareDate.getString(“GUE_PWD”, “HAVE NO PWD !”);

// showInfo.setText("密码是: "+pwd);

//showInfo.setText(com.android.mms.R.string.zj_set_pwd_tip);

}

public void saveSecondPwd(View v){

secondPwd = (EditText)findViewById(com.android.mms.R.id.second_pwd);

String secondStr = secondPwd.getText().toString();

if(secondStr!= null && secondStr.trim().length() != 0){

//获取SharedPreferences对象

// Context ctx = MainActivity.this;

SharedPreferences secondShare = getSharedPreferences(“SECOND_PWD”, MODE_PRIVATE);

//存入数据

Editor editor = secondShare.edit();

editor.putString(“SECOND_KEY”, secondStr);

editor.putBoolean(“SECOND_IS_SET”, true);

editor.commit();

Toast.makeText(this, com.android.mms.R.string.zj_set_pwd_success, Toast.LENGTH_SHORT).show();

finish();

}else{

Toast.makeText(this, com.android.mms.R.string.zj_pwd_null, Toast.LENGTH_SHORT).show();

}

}

}

MmsLockCheckPwd.java:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import android.app.Activity;

import android.content.Context;

import android.content.Intent;

import android.content.SharedPreferences;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Canvas;

import android.graphics.Color;

import android.graphics.Paint;

import android.graphics.Typeface;

import android.graphics.Paint.Cap;

import android.graphics.Paint.Style;

//import android.os.Vibrator; // zj Cancel

import android.util.AttributeSet;

import android.view.MotionEvent;

import android.view.View;

import android.widget.TextView;

public class MmsLockCheckPwd extends View {

TextView tv_forget_pwd = (TextView) findViewById(com.android.mms.R.id.zj_lock_forget_pwd);

Paint linePaint = new Paint();

Paint whiteLinePaint = new Paint();

Paint textPaint = new Paint();

Bitmap defaultBitmap = BitmapFactory.decodeResource(getResources(),

com.android.mms.R.drawable.lock);

int defaultBitmapRadius = defaultBitmap.getWidth() / 2;

Bitmap selectedBitmap = BitmapFactory.decodeResource(getResources(),

com.android.mms.R.drawable.indicator_lock_area);

int selectedBitmapDiameter = selectedBitmap.getWidth();

int selectedBitmapRadius = selectedBitmapDiameter / 2;

PointInfo[] points = new PointInfo[9];

PointInfo startPoint = null;

int width, height;

int moveX, moveY;

boolean isUp = false;

Context ctx;

StringBuffer lockString = new StringBuffer();

public MmsLockCheckPwd(Context context) {

super(context);

ctx = context;

// this.setBackgroundColor(Color.WHITE);

initPaint();

}

public MmsLockCheckPwd(Context context, AttributeSet attrs) {

super(context, attrs);

// this.setBackgroundColor(Color.WHITE);

tv_forget_pwd.setVisibility(View.VISIBLE); // zj add

initPaint();

}

@Override

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

width = getWidth();

height = getHeight();

if (width != 0 && height != 0) {

initPoints(points);

}

super.onMeasure(widthMeasureSpec, heightMeasureSpec);

}

@Override

protected void onLayout(boolean changed, int left, int top, int right,

int bottom) {

super.onLayout(changed, left, top, right, bottom);

}

private int startX = 0, startY = 0;

@Override

protected void onDraw(Canvas canvas) {

// canvas.drawText(“passwd:” + lockString, 0, 40, textPaint);

if (moveX != 0 && moveY != 0 && startX != 0 && startY != 0) {

// drawLine(canvas, startX, startY, moveX, moveY);

}

drawNinePoint(canvas);

super.onDraw(canvas);

}

@Override

public boolean onTouchEvent(MotionEvent event) {

boolean flag = true;

if (isUp) {

finishDraw();

flag = false;

} else {

handlingEvent(event);

flag = true;

}

return flag;

}

private void handlingEvent(MotionEvent event) {

switch (event.getAction()) {

case MotionEvent.ACTION_MOVE:

moveX = (int) event.getX();

moveY = (int) event.getY();

for (PointInfo temp : points) {

if (temp.isInMyPlace(moveX, moveY)

&& temp.isSelected() == false) {

temp.setSelected(true);

startX = temp.getCenterX();

startY = temp.getCenterY();

int len = lockString.length();

if (len != 0) {

int preId = lockString.charAt(len - 1) - 48;

points[preId].setNextId(temp.getId());

}

lockString.append(temp.getId());

break;

}

}

invalidate(0, height - width, width, height);

break;

case MotionEvent.ACTION_DOWN:

int downX = (int) event.getX();

int downY = (int) event.getY();

for (PointInfo temp : points) {

if (temp.isInMyPlace(downX, downY)) {

temp.setSelected(true);

startPoint = temp;

startX = temp.getCenterX();

startY = temp.getCenterY();

lockString.append(temp.getId());

break;

}

}

invalidate(0, height - width, width, height);

break;

case MotionEvent.ACTION_UP:

startX = startY = moveX = moveY = 0;

isUp = true;

invalidate();

savePwd();

break;

default:

break;

}

}

private void finishDraw() {

for (PointInfo temp : points) {

temp.setSelected(false);

temp.setNextId(temp.getId());

}

lockString.delete(0, lockString.length());

isUp = false;

invalidate();

}

private void initPoints(PointInfo[] points) {

int len = points.length;

int seletedSpacing = (width - selectedBitmapDiameter * 3) / 4;

int seletedX = seletedSpacing;

int seletedY = height - width + seletedSpacing;

int defaultX = seletedX + selectedBitmapRadius - defaultBitmapRadius;

int defaultY = seletedY + selectedBitmapRadius - defaultBitmapRadius;

for (int i = 0; i < len; i++) {

if (i == 3 || i == 6) {

seletedX = seletedSpacing;

seletedY += selectedBitmapDiameter + seletedSpacing;

defaultX = seletedX + selectedBitmapRadius

  • defaultBitmapRadius;

defaultY += selectedBitmapDiameter + seletedSpacing;

}

points[i] = new PointInfo(i, defaultX, defaultY, seletedX, seletedY);

seletedX += selectedBitmapDiameter + seletedSpacing;

defaultX += selectedBitmapDiameter + seletedSpacing;

}

}

private void initPaint() {

initLinePaint(linePaint);

initTextPaint(textPaint);

initWhiteLinePaint(whiteLinePaint);

}

private void initTextPaint(Paint paint) {

textPaint.setTextSize(30);

textPaint.setAntiAlias(true);

textPaint.setTypeface(Typeface.MONOSPACE);

}

private void initLinePaint(Paint paint) {

// paint.setColor(Color.GRAY);

paint.setColor(Color.parseColor(“#1E90FF”));

// paint.setStyle(Style.STROKE);

paint.setStyle(Style.FILL);

paint.setStrokeWidth(10);

paint.setAntiAlias(true);

paint.setStrokeCap(Cap.ROUND);

}

private void initWhiteLinePaint(Paint paint) {

// paint.setColor(Color.WHITE);

paint.setColor(Color.parseColor(“#1E90FF”));

paint.setStrokeWidth(8);

paint.setAntiAlias(true);

paint.setStrokeCap(Cap.ROUND);

}

private void drawNinePoint(Canvas canvas) {

if (startPoint != null) {

drawEachLine(canvas, startPoint);

}

for (PointInfo pointInfo : points) {

if (pointInfo != null) {

if (pointInfo.isSelected()) {

canvas.drawBitmap(selectedBitmap, pointInfo.getSeletedX(),

pointInfo.getSeletedY(), null);

} else { // zj add else case

canvas.drawBitmap(defaultBitmap, pointInfo.getDefaultX(),

pointInfo.getDefaultY(), null);

}

}

}

}

/**

  • @param canvas

  • @param point

*/

private void drawEachLine(Canvas canvas, PointInfo point) {

if (point.hasNextId()) {

int n = point.getNextId();

drawLine(canvas, point.getCenterX(), point.getCenterY(),

points[n].getCenterX(), points[n].getCenterY());

drawEachLine(canvas, points[n]);

}

}

/**

  • @param canvas

  • @param startX

  • @param startY

  • @param stopX

  • @param stopY

*/

private void drawLine(Canvas canvas, float startX, float startY,

float stopX, float stopY) {

canvas.drawLine(startX, startY, stopX, stopY, linePaint);

canvas.drawLine(startX, startY, stopX, stopY, whiteLinePaint);

}

private class PointInfo {

private int id;

private int nextId;

private boolean selected;

private int defaultX;

private int defaultY;

private int seletedX;

private int seletedY;

public PointInfo(int id, int defaultX, int defaultY, int seletedX,

int seletedY) {

this.id = id;

this.nextId = id;

this.defaultX = defaultX;

this.defaultY = defaultY;

this.seletedX = seletedX;

this.seletedY = seletedY;

}

public boolean isSelected() {

return selected;

}

public void setSelected(boolean selected) {

this.selected = selected;

}

public int getId() {

return id;

}

public int getDefaultX() {

return defaultX;

}

public int getDefaultY() {

return defaultY;

}

public int getSeletedX() {

return seletedX;

}

public int getSeletedY() {

return seletedY;

}

public int getCenterX() {

return seletedX + selectedBitmapRadius;

}

public int getCenterY() {

return seletedY + selectedBitmapRadius;

}

public boolean hasNextId() {

return nextId != id;

}

public int getNextId() {

return nextId;

}

public void setNextId(int nextId) {

this.nextId = nextId;

}

/**

  • @param x

  • @param y

*/

public boolean isInMyPlace(int x, int y) {

boolean inX = x > seletedX

&& x < (seletedX + selectedBitmapDiameter);

boolean inY = y > seletedY

&& y < (seletedY + selectedBitmapDiameter);

return (inX && inY);

}

}

public String getPwd() {

return lockString.toString();

}

public void savePwd() {

Intent intent = new Intent();

SharedPreferences shareDate = ctx.getSharedPreferences(“GUE_PWD”, 0);

String pwd = this.getPwd();

String first_pwd = shareDate.getString(“GUE_PWD”, “HAVE NO PWD”);

if (pwd.equals(first_pwd)) {

// shareDate.edit().clear().commit();

// shareDate.edit().putBoolean(“IS_SET”, true).commit();

// shareDate.edit().putString(“GUE_PWD”, pwd).commit();

intent.setClass(ctx, MmsLockList.class);

} else {

// shareDate.edit().putBoolean(“SECOND_ERROR”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

ctx.startActivity(intent);

((Activity) ctx).finish();

}

}

到这儿核心功能都贴出来了,布局和资源还有项目代码等以后分离出独立工程的时候附加在后边。

有疑问欢迎交流。

转载请注明出处:周木水的CSDN博客 http://blog.csdn.net/zhoumushui

我的GitHub:周木水的GitHub https://github.com/zhoumushui

洗衣机坏了,有时候按一会儿就可以启动了,今天怎么弄都没效果,大概是启动电容的问题吧,悲剧。

下午去看公司部门间的球赛,我们队再胜一局,维持不败战绩,作为拉拉队员还是很开心的。

今天接着昨天的内容开始~

哎呀,代码在公司,明天再补充。先去学习。

Mms类:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

public class MmsLockMsg {

int _id;

int thread_id; // 号码区分标识

long address; // 号码

long date; // 日期

int type;//信息类型

// long date_sent; // 发送日期

String body; // 短信内容

String name;

public MmsLockMsg(int id, int thread_id, long address, long date,int type,String body,String name) {

this._id = id;

this.thread_id = thread_id;

this.address = address;

this.date = date;

this.type =type;

this.body = body;

this.name = name;

}

public MmsLockMsg(int thread_id, long address, long date,int type, String body,String name) {

this.thread_id = thread_id;

this.address = address;

this.date = date;

this.type =type;

this.body = body;

this.name = name;

}

public int getId() {

return _id;

}

public int getThreadId() {

return thread_id;

}

public void setThreadId(int thread_id) {

this.thread_id = thread_id;

}

public long getAddress() {

return address;

}

public void setAddress(long address) {

this.address = address;

}

public long getDate() {

return date;

}

public void setDate(long date) {

this.date = date;

}

public int getType(){

return type;

}

public void setType(int type){

this.type=type;

}

public String getBody() {

return body;

}

public void setBody(String body) {

this.body = body;

}

public String getName(){

return name;

}

public void setName(String name){

this.name = name;

}

}

设置手势密码页:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import android.app.Activity;

import android.content.Context;

import android.content.Intent;

import android.content.SharedPreferences;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Canvas;

import android.graphics.Color;

import android.graphics.Paint;

import android.graphics.Paint.Style;

import android.graphics.Typeface;

import android.graphics.Paint.Cap;

import android.util.AttributeSet;

import android.view.MotionEvent;

import android.view.View;

import android.widget.TextView;

public class MmsLockSetPwd extends View {

TextView tv_forget_pwd = (TextView)findViewById(com.android.mms.R.id.zj_lock_forget_pwd);

Paint linePaint = new Paint();

Paint whiteLinePaint = new Paint();

Paint textPaint = new Paint();

Bitmap defaultBitmap = BitmapFactory.decodeResource(getResources(),

com.android.mms.R.drawable.lock);

int defaultBitmapRadius = defaultBitmap.getWidth() / 2;

Bitmap selectedBitmap = BitmapFactory.decodeResource(getResources(),

com.android.mms.R.drawable.indicator_lock_area);

int selectedBitmapDiameter = selectedBitmap.getWidth();

int selectedBitmapRadius = selectedBitmapDiameter / 2;

PointInfo[] points = new PointInfo[9];

PointInfo startPoint = null;

int width, height;

int moveX, moveY;

boolean isUp = false;

Context ctx;

StringBuffer lockString = new StringBuffer();

public MmsLockSetPwd(Context context) {

super(context);

ctx = context;

// this.setBackgroundColor(Color.WHITE);

initPaint();

}

public MmsLockSetPwd(Context context, AttributeSet attrs) {

super(context, attrs);

// this.setBackgroundColor(Color.WHITE);

tv_forget_pwd.setVisibility(View.GONE); //zj add

initPaint();

}

@Override

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

width = getWidth();

height = getHeight();

if (width != 0 && height != 0) {

initPoints(points);

}

super.onMeasure(widthMeasureSpec, heightMeasureSpec);

}

@Override

protected void onLayout(boolean changed, int left, int top, int right,

int bottom) {

super.onLayout(changed, left, top, right, bottom);

}

private int startX = 0, startY = 0;

@Override

protected void onDraw(Canvas canvas) {

// canvas.drawText(“passwd:” + lockString, 0, 40, textPaint);

if (moveX != 0 && moveY != 0 && startX != 0 && startY != 0) {

// drawLine(canvas, startX, startY, moveX, moveY);

}

drawNinePoint(canvas);

super.onDraw(canvas);

}

@Override

public boolean onTouchEvent(MotionEvent event) {

boolean flag = true;

if (isUp) {

finishDraw();

flag = false;

} else {

handlingEvent(event);

flag = true;

}

return flag;

}

private void handlingEvent(MotionEvent event) {

switch (event.getAction()) {

case MotionEvent.ACTION_MOVE:

moveX = (int) event.getX();

moveY = (int) event.getY();

for (PointInfo temp : points) {

if (temp.isInMyPlace(moveX, moveY)

&& temp.isSelected() == false) {

temp.setSelected(true);

startX = temp.getCenterX();

startY = temp.getCenterY();

int len = lockString.length();

if (len != 0) {

int preId = lockString.charAt(len - 1) - 48;

points[preId].setNextId(temp.getId());

}

lockString.append(temp.getId());

break;

}

}

invalidate(0, height - width, width, height);

break;

case MotionEvent.ACTION_DOWN:

int downX = (int) event.getX();

int downY = (int) event.getY();

for (PointInfo temp : points) {

if (temp.isInMyPlace(downX, downY)) {

temp.setSelected(true);

startPoint = temp;

startX = temp.getCenterX();

startY = temp.getCenterY();

lockString.append(temp.getId());

break;

}

}

invalidate(0, height - width, width, height);

break;

case MotionEvent.ACTION_UP:

startX = startY = moveX = moveY = 0;

isUp = true;

invalidate();

savePwd();

break;

default:

break;

}

}

private void finishDraw() {

for (PointInfo temp : points) {

temp.setSelected(false);

temp.setNextId(temp.getId());

}

lockString.delete(0, lockString.length());

isUp = false;

invalidate();

}

private void initPoints(PointInfo[] points) {

int len = points.length;

int seletedSpacing = (width - selectedBitmapDiameter * 3) / 4;

int seletedX = seletedSpacing;

int seletedY = height - width + seletedSpacing;

int defaultX = seletedX + selectedBitmapRadius - defaultBitmapRadius;

int defaultY = seletedY + selectedBitmapRadius - defaultBitmapRadius;

for (int i = 0; i < len; i++) {

if (i == 3 || i == 6) {

seletedX = seletedSpacing;

seletedY += selectedBitmapDiameter + seletedSpacing;

defaultX = seletedX + selectedBitmapRadius

  • defaultBitmapRadius;

defaultY += selectedBitmapDiameter + seletedSpacing;

}

points[i] = new PointInfo(i, defaultX, defaultY, seletedX, seletedY);

seletedX += selectedBitmapDiameter + seletedSpacing;

defaultX += selectedBitmapDiameter + seletedSpacing;

}

}

private void initPaint() {

initLinePaint(linePaint);

initTextPaint(textPaint);

initWhiteLinePaint(whiteLinePaint);

}

/**

  • @param paint

*/

private void initTextPaint(Paint paint) {

textPaint.setTextSize(30);

textPaint.setAntiAlias(true);

textPaint.setTypeface(Typeface.MONOSPACE);

}

/**

  • @param paint

*/

private void initLinePaint(Paint paint) {

//paint.setColor(Color.GRAY);

paint.setColor(Color.parseColor(“#1E90FF”));

//paint.setStyle(Style.STROKE);

paint.setStyle(Style.FILL);

paint.setStrokeWidth(10);

paint.setAntiAlias(true);

paint.setStrokeCap(Cap.ROUND);

}

/**

  • @param paint

*/

private void initWhiteLinePaint(Paint paint) {

//paint.setColor(Color.WHITE);

paint.setColor(Color.parseColor(“#1E90FF”));

paint.setStrokeWidth(8);

paint.setAntiAlias(true);

paint.setStrokeCap(Cap.ROUND);

}

/**

  • @param canvas

*/

private void drawNinePoint(Canvas canvas) {

if (startPoint != null) {

drawEachLine(canvas, startPoint);

}

for (PointInfo pointInfo : points) {

if (pointInfo != null) {

if (pointInfo.isSelected()) {

canvas.drawBitmap(selectedBitmap, pointInfo.getSeletedX(),

pointInfo.getSeletedY(), null);

}else{ // zj add

canvas.drawBitmap(defaultBitmap, pointInfo.getDefaultX(),

pointInfo.getDefaultY(), null);

}

}

}

}

/**

  • @param canvas

  • @param point

*/

private void drawEachLine(Canvas canvas, PointInfo point) {

if (point.hasNextId()) {

int n = point.getNextId();

drawLine(canvas, point.getCenterX(), point.getCenterY(),

points[n].getCenterX(), points[n].getCenterY());

drawEachLine(canvas, points[n]);

}

}

/**

  • @param canvas

  • @param startX

  • @param startY

  • @param stopX

  • @param stopY

*/

private void drawLine(Canvas canvas, float startX, float startY,

float stopX, float stopY) {

canvas.drawLine(startX, startY, stopX, stopY, linePaint);

canvas.drawLine(startX, startY, stopX, stopY, whiteLinePaint);

}

/**

  • @author zkwlx

*/

private class PointInfo {

private int id;

private int nextId;

private boolean selected;

private int defaultX;

private int defaultY;

private int seletedX;

private int seletedY;

public PointInfo(int id, int defaultX, int defaultY, int seletedX,

int seletedY) {

this.id = id;

this.nextId = id;

this.defaultX = defaultX;

this.defaultY = defaultY;

this.seletedX = seletedX;

this.seletedY = seletedY;

}

public boolean isSelected() {

return selected;

}

public void setSelected(boolean selected) {

this.selected = selected;

}

public int getId() {

return id;

}

public int getDefaultX() {

return defaultX;

}

public int getDefaultY() {

return defaultY;

}

public int getSeletedX() {

return seletedX;

}

public int getSeletedY() {

return seletedY;

}

public int getCenterX() {

return seletedX + selectedBitmapRadius;

}

public int getCenterY() {

return seletedY + selectedBitmapRadius;

}

public boolean hasNextId() {

return nextId != id;

}

public int getNextId() {

return nextId;

}

public void setNextId(int nextId) {

this.nextId = nextId;

}

/**

  • @param x

  • @param y

*/

public boolean isInMyPlace(int x, int y) {

boolean inX = x > seletedX

&& x < (seletedX + selectedBitmapDiameter);

boolean inY = y > seletedY

&& y < (seletedY + selectedBitmapDiameter);

return (inX && inY);

}

}

public String getPwd() {

return lockString.toString();

}

public void savePwd() {

Intent intent = new Intent();

SharedPreferences shareDate = ctx.getSharedPreferences(“GUE_PWD”, 0);

boolean isSetFirst = shareDate.getBoolean(“IS_SET_FIRST”, false);

if (isSetFirst) {

String pwd = this.getPwd();

String first_pwd = shareDate.getString(“FIRST_PWD”, “HAVE NO PWD”);

if (pwd.equals(first_pwd)) {

shareDate.edit().clear().commit();

shareDate.edit().putBoolean(“IS_SET”, true).commit();

shareDate.edit().putString(“GUE_PWD”, pwd).commit();

intent.setClass(ctx, MmsLockSetPwdOk.class);

} else {

shareDate.edit().putBoolean(“SECOND_ERROR”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

} else {

shareDate.edit().clear().commit();

shareDate.edit().putString(“FIRST_PWD”, this.getPwd()).commit();

shareDate.edit().putBoolean(“IS_SET_FIRST”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

ctx.startActivity(intent);

((Activity) ctx).finish();

}

}

手势密码设置成功后,让用户输入字符密保,以防遗忘手势密码:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import android.app.Activity;

import android.content.SharedPreferences;

import android.content.SharedPreferences.Editor;

import android.os.Bundle;

import android.view.View;

import android.view.Window;

import android.widget.EditText;

import android.widget.TextView;
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则近万的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。

img

img

img

img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:Android)

最后

答应大伙的备战金三银四,大厂面试真题来啦!

这份资料我从春招开始,就会将各博客、论坛。网站上等优质的Android开发中高级面试题收集起来,然后全网寻找最优的解答方案。每一道面试题都是百分百的大厂面经真题+最优解答。包知识脉络 + 诸多细节。
节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习。

《960全网最全Android开发笔记》

《379页Android开发面试宝典》

包含了腾讯、百度、小米、阿里、乐视、美团、58、猎豹、360、新浪、搜狐等一线互联网公司面试被问到的题目。熟悉本文中列出的知识点会大大增加通过前两轮技术面试的几率。

如何使用它?
1.可以通过目录索引直接翻看需要的知识点,查漏补缺。
2.五角星数表示面试问到的频率,代表重要推荐指数

《507页Android开发相关源码解析》

只要是程序员,不管是Java还是Android,如果不去阅读源码,只看API文档,那就只是停留于皮毛,这对我们知识体系的建立和完备以及实战技术的提升都是不利的。

真正最能锻炼能力的便是直接去阅读源码,不仅限于阅读各大系统源码,还包括各种优秀的开源库。

腾讯、字节跳动、阿里、百度等BAT大厂 2020-2021面试真题解析

资料收集不易,如果大家喜欢这篇文章,或者对你有帮助不妨多多点赞转发关注哦。文章会持续更新的。绝对干货!!!

《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!

oolean hasNextId() {

return nextId != id;

}

public int getNextId() {

return nextId;

}

public void setNextId(int nextId) {

this.nextId = nextId;

}

/**

  • @param x

  • @param y

*/

public boolean isInMyPlace(int x, int y) {

boolean inX = x > seletedX

&& x < (seletedX + selectedBitmapDiameter);

boolean inY = y > seletedY

&& y < (seletedY + selectedBitmapDiameter);

return (inX && inY);

}

}

public String getPwd() {

return lockString.toString();

}

public void savePwd() {

Intent intent = new Intent();

SharedPreferences shareDate = ctx.getSharedPreferences(“GUE_PWD”, 0);

boolean isSetFirst = shareDate.getBoolean(“IS_SET_FIRST”, false);

if (isSetFirst) {

String pwd = this.getPwd();

String first_pwd = shareDate.getString(“FIRST_PWD”, “HAVE NO PWD”);

if (pwd.equals(first_pwd)) {

shareDate.edit().clear().commit();

shareDate.edit().putBoolean(“IS_SET”, true).commit();

shareDate.edit().putString(“GUE_PWD”, pwd).commit();

intent.setClass(ctx, MmsLockSetPwdOk.class);

} else {

shareDate.edit().putBoolean(“SECOND_ERROR”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

} else {

shareDate.edit().clear().commit();

shareDate.edit().putString(“FIRST_PWD”, this.getPwd()).commit();

shareDate.edit().putBoolean(“IS_SET_FIRST”, true).commit();

intent.setClass(ctx, MmsLock.class);

}

ctx.startActivity(intent);

((Activity) ctx).finish();

}

}

手势密码设置成功后,让用户输入字符密保,以防遗忘手势密码:

/*

  • ZJ add for Mms Lock

*/

package com.android.mms.ui;

import android.app.Activity;

import android.content.SharedPreferences;

import android.content.SharedPreferences.Editor;

import android.os.Bundle;

import android.view.View;

import android.view.Window;

import android.widget.EditText;

import android.widget.TextView;
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则近万的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。

[外链图片转存中…(img-sLqqX7B6-1712357609702)]

[外链图片转存中…(img-U5dkV8WH-1712357609703)]

[外链图片转存中…(img-dYNa5pxm-1712357609703)]

[外链图片转存中…(img-vbnxm6ao-1712357609703)]

[外链图片转存中…(img-VeDRyPPv-1712357609703)]

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:Android)

最后

答应大伙的备战金三银四,大厂面试真题来啦!

这份资料我从春招开始,就会将各博客、论坛。网站上等优质的Android开发中高级面试题收集起来,然后全网寻找最优的解答方案。每一道面试题都是百分百的大厂面经真题+最优解答。包知识脉络 + 诸多细节。
节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习。

《960全网最全Android开发笔记》

[外链图片转存中…(img-YThKuwhA-1712357609704)]

《379页Android开发面试宝典》

包含了腾讯、百度、小米、阿里、乐视、美团、58、猎豹、360、新浪、搜狐等一线互联网公司面试被问到的题目。熟悉本文中列出的知识点会大大增加通过前两轮技术面试的几率。

如何使用它?
1.可以通过目录索引直接翻看需要的知识点,查漏补缺。
2.五角星数表示面试问到的频率,代表重要推荐指数

[外链图片转存中…(img-VCmHQfF4-1712357609704)]

《507页Android开发相关源码解析》

只要是程序员,不管是Java还是Android,如果不去阅读源码,只看API文档,那就只是停留于皮毛,这对我们知识体系的建立和完备以及实战技术的提升都是不利的。

真正最能锻炼能力的便是直接去阅读源码,不仅限于阅读各大系统源码,还包括各种优秀的开源库。

[外链图片转存中…(img-IRT3bLdf-1712357609704)]

腾讯、字节跳动、阿里、百度等BAT大厂 2020-2021面试真题解析

[外链图片转存中…(img-gqwBIajO-1712357609704)]

资料收集不易,如果大家喜欢这篇文章,或者对你有帮助不妨多多点赞转发关注哦。文章会持续更新的。绝对干货!!!

《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!

  • 7
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值