资源简介
ca.jkiv.RingLoudContacts
Note: this app may require caller-ID.
This is an Android app that maximizes the phone's volume when certain numbers are calling. These numbers are specified by the user. The user can add one of his/her contacts or specify a number manually.
Author: Jon Kivinen
License: BSD
代码片段和文件信息
package ca.jkiv.RingLoudContacts;
import java.io.InputStream;
import java.util.linkedList;
import java.util.List;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.onclickListener;
import android.content.Intent;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.PhoneLookup;
import android.text.InputType;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
/**
* The activity for editing the contacts list.
*
* @author Jon Kivinen
*/
public class ContactsListActivity extends ListActivity
{
private static final String LOG_TAG = “ContactsListActivity“;
private static final int CHOOSE_CONTACT_RESULT = 1001;
private List listData;
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set empty contact list layout
setContentView(R.layout.contacts_list_empty);
// Register context menu
registerForContextMenu(getListView());
// Populate list
listData = ContactsListPersistence.getContactList(this);
// Create an array adapter for listData
ContactsListAdapter adapter = new ContactsListAdapter(this listData);
// Create observer to update SharedPreferences when the list changes
adapter.registerDataSetObserver(new DataSetObserver()
{
@Override
public void onchanged()
{
// Update shared preferences
ContactsListPersistence.setContactList(ContactsListActivity.this listData);
}
});
// Set list adapter
setListAdapter(adapter);
}
@Override
/**
* Edit a list item when it is clicked.
*/
protected void onListItemClick (ListView l View v int position long id)
{
editNumberByDialog(id);
}
@Override
/**
* Called when context menu is created.
*/
public void onCreateContextMenu(ContextMenu menu View view ContextMenuInfo menuInfo)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-04 19:17 RingLoudContacts-master\
文件 59 2018-04-04 19:17 RingLoudContacts-master\.gitignore
文件 1364 2018-04-04 19:17 RingLoudContacts-master\AndroidManifest.xm
文件 617 2018-04-04 19:17 RingLoudContacts-master\README.md
文件 364 2018-04-04 19:17 RingLoudContacts-master\default.properties
文件 115133 2018-04-04 19:17 RingLoudContacts-master\hi-res.png
文件 28696 2018-04-04 19:17 RingLoudContacts-master\ic_launcher_ringloudcontacts.svg
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\drawable-hdpi\
文件 8305 2018-04-04 19:17 RingLoudContacts-master\res\drawable-hdpi\ic_contact_unknown.png
文件 6610 2018-04-04 19:17 RingLoudContacts-master\res\drawable-hdpi\ic_launcher_ring_loud_contacts.png
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\drawable-ldpi\
文件 4477 2018-04-04 19:17 RingLoudContacts-master\res\drawable-ldpi\ic_contact_unknown.png
文件 2276 2018-04-04 19:17 RingLoudContacts-master\res\drawable-ldpi\ic_launcher_ring_loud_contacts.png
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\drawable-mdpi\
文件 5260 2018-04-04 19:17 RingLoudContacts-master\res\drawable-mdpi\ic_contact_unknown.png
文件 3585 2018-04-04 19:17 RingLoudContacts-master\res\drawable-mdpi\ic_launcher_ring_loud_contacts.png
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\layout\
文件 928 2018-04-04 19:17 RingLoudContacts-master\res\layout\about_dialog.xm
文件 1549 2018-04-04 19:17 RingLoudContacts-master\res\layout\contacts_list.xm
文件 790 2018-04-04 19:17 RingLoudContacts-master\res\layout\contacts_list_empty.xm
文件 735 2018-04-04 19:17 RingLoudContacts-master\res\layout\edittext_dialog.xm
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\menu\
文件 838 2018-04-04 19:17 RingLoudContacts-master\res\menu\contacts_list_context_menu.xm
文件 1664 2018-04-04 19:17 RingLoudContacts-master\res\menu\contacts_list_menu.xm
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\values\
文件 3550 2018-04-04 19:17 RingLoudContacts-master\res\values\strings.xm
目录 0 2018-04-04 19:17 RingLoudContacts-master\res\xm
文件 963 2018-04-04 19:17 RingLoudContacts-master\res\xm
目录 0 2018-04-04 19:17 RingLoudContacts-master\screenshots\
文件 46250 2018-04-04 19:17 RingLoudContacts-master\screenshots\contacts.png
............此处省略14个文件信息
- 上一篇:Android连连看游戏源代码集锦
- 下一篇:Java web 课程设计宿舍管理系统
相关资源
- Android代码-EffortlessPermissions
- Android仿照苹果界面,手写的计算器
- Android代码-easyexcel
- Android代码-安卓虚拟摇杆
- Android代码-仿微信朋友圈全文、完全采
- Android代码-RTSP播放器源码.zip
- Android代码-Android rtmp rtsp 推流客户端
- 根据厂商rom打开权限管理(android代码
- 第一行Android代码源码
- Android代码-中国象棋
- Android代码-一键测出你与照片中物体的
- Android代码-Python 3 for Android
- Android代码-科学计算器源码.zip
- Android代码实现布局
- 仿新浪微博界面的Android代码
- Android代码-一个 TV app 的直播节目,包
评论
共有 条评论