2024年Android最全Android通讯录管理(获取联系人、通话记录、短信消息)(1),阿里安卓面试题

最后

总之啊,家里没矿的同学们,如果你们想以后的日子过得好一些,多想想你们的业余时间怎么安排吧;

技术方面的提升肯定是重中之重,但是技术外的一些“软实力”也不能完全忽视,很多时候升职确实是因为你的技术足够强,但也与你的“软实力”密切相关

在这我也分享一份大佬自己收录整理的 Android学习PDF+架构视频+面试文档+源码笔记 ,还有高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料这些都是我闲暇还会反复翻阅并给下属员工学习的精品资料。在脑图中,每个知识点专题都配有相对应的实战项目,可以有效的帮助大家掌握知识点。

总之也是在这里帮助大家学习提升进阶,也节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习

相信自己,没有做不到的,只有想不到的

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”

android:id=“@+id/contact_record_view”

android:layout_width=“match_parent”

android:layout_height=“match_parent”

android:background=“#000000”>

<ListView

android:id=“@+id/call_log_list”

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:layout_alignParentTop=“true”

android:cacheColorHint=“#000000”

android:fadingEdge=“none”

android:scrollingCache=“false”

android:visibility=“visible” />

/Contact_Demo/res/layout/contact_record_list_item.xml

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”

android:orientation=“vertical” >

<ImageView

android:id=“@+id/call_type”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_centerVertical=“true”

android:layout_marginLeft=“5dip”

android:layout_marginRight=“5dip”

android:background=“@drawable/ic_calllog_outgoing_nomal” />

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_centerVertical=“true”

android:layout_toRightOf=“@+id/call_type”

android:orientation=“vertical” >

<TextView

android:id=“@+id/name”

android:layout_width=“wrap_content”

android:layout_height=“0dip”

android:layout_weight=“1”

android:textAppearance=“?android:textAppearanceMedium”

android:textColor=“#ffffff” />

<TextView

android:id=“@+id/number”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:textAppearance=“?android:textAppearanceSmall”

android:textColor=“#cccccc” />

<TextView

android:id=“@+id/call_btn”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_alignParentRight=“true”

android:layout_centerVertical=“true”

android:layout_marginLeft=“10dip”

android:layout_marginRight=“10dip”

android:background=“@drawable/ic_calllog_call_btn” />

<ImageView

android:id=“@+id/fg”

android:layout_width=“wrap_content”

android:layout_height=“75dip”

android:layout_toLeftOf=“@+id/call_btn”

android:background=“@drawable/black_bg” />

<TextView

android:id=“@+id/time”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_centerVertical=“true”

android:layout_toLeftOf=“@+id/fg”

android:textColor=“#ffffff” />

定义实体类:

/Contact_Demo/src/com/suntek/contact/model/CallLogBean.java

package com.suntek.contact.model;

/**

  • 通话记录实体类

  • @author Administrator

*/

public class CallLogBean {

private int id;

private String name; // 名称

private String number; // 号码

private String date; // 日期

private int type; // 来电:1,拨出:2,未接:3

private int count; // 通话次数

public int getId() {

return id;

}

public void setId(int id) {

this.id = id;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getNumber() {

return number;

}

public void setNumber(String number) {

this.number = number;

}

public String getDate() {

return date;

}

public void setDate(String date) {

this.date = date;

}

public int getType() {

return type;

}

public void setType(int type) {

this.type = type;

}

public int getCount() {

return count;

}

public void setCount(int count) {

this.count = count;

}

}

/Contact_Demo/src/com/suntek/contact/adapter/DialAdapter.java

package com.suntek.contact.adapter;

import java.util.List;

import android.content.Context;

import android.content.Intent;

import android.net.Uri;

import android.view.LayoutInflater;

import android.view.View;

import android.view.View.OnClickListener;

import android.view.ViewGroup;

import android.widget.BaseAdapter;

import android.widget.ImageView;

import android.widget.TextView;

import com.suntek.contact.R;

import com.suntek.contact.model.CallLogBean;

/**

  • 电话记录适配器

  • @author Administrator

*/

public class DialAdapter extends BaseAdapter {

private Context ctx;

private List callLogs;

private LayoutInflater inflater;

public DialAdapter(Context context, List callLogs) {

this.ctx = context;

this.callLogs = callLogs;

this.inflater = LayoutInflater.from(context);

}

@Override

public int getCount() {

return callLogs.size();

}

@Override

public Object getItem(int position) {

return callLogs.get(position);

}

@Override

public long getItemId(int position) {

return position;

}

@Override

public View getView(int position, View convertView, ViewGroup parent) {

ViewHolder holder;

if (convertView == null) {

convertView = inflater.inflate(R.layout.contact_record_list_item,

null);

holder = new ViewHolder();

holder.call_type = (ImageView) convertView

.findViewById(R.id.call_type);

holder.name = (TextView) convertView.findViewById(R.id.name);

holder.number = (TextView) convertView.findViewById(R.id.number);

holder.time = (TextView) convertView.findViewById(R.id.time);

holder.call_btn = (TextView) convertView

.findViewById(R.id.call_btn);

convertView.setTag(holder); // 缓存

} else {

holder = (ViewHolder) convertView.getTag();

}

CallLogBean callLog = callLogs.get(position);

switch (callLog.getType()) {

case 1:

holder.call_type

.setBackgroundResource(R.drawable.ic_calllog_outgoing_nomal);

break;

case 2:

holder.call_type

.setBackgroundResource(R.drawable.ic_calllog_incomming_normal);

最后

有任何问题,欢迎广大网友一起来交流,分享高阶Android学习视频资料和面试资料包~

偷偷说一句:群里高手如云,欢迎大家加群和大佬们一起交流讨论啊!

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

esource(R.drawable.ic_calllog_outgoing_nomal);

break;

case 2:

holder.call_type

.setBackgroundResource(R.drawable.ic_calllog_incomming_normal);

最后

有任何问题,欢迎广大网友一起来交流,分享高阶Android学习视频资料和面试资料包~

偷偷说一句:群里高手如云,欢迎大家加群和大佬们一起交流讨论啊!

[外链图片转存中…(img-jsMDJKhT-1715619565830)]

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

  • 27
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值