- 浏览: 246395 次
- 性别:
- 来自: 深圳
最新评论
-
江恂泽:
楼主 这家伙会把data 拆分开来 转换成day year形 ...
JsonUtil -
mdsp25xhm:
为何没有列表查询功能?
myBatis DAO封装
文章列表
public class Clien
{
private static Socket socket;
public static void main(String[] args)
{
try
{
connect();
}
catch (IOException e)
{
e.printStackTrace();
}
}
private static void connect() thr ...
Android部分错误以及解决方案汇总
- 博客分类:
- andriod
错误1:AndroidRuntime(285): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {net.mickey.basic.learn/net.mickey.basic.learn.DisposeService}; have you declared this activity in your AndroidManifest.xml?
解决方案:AndroidManifest.xml中没有定义DisposeService对象,在文件中加入该对象便可
public class DisposeBCReceiver extends BroadcastReceiver
{
public static final String SMS_ACTION = "android.provider.Telephony.SMS_RECEIVED";
@Override
public void onReceive(Context context, Intent intent)
{
Bundle bundle = intent.getExtras();
Stri ...
public class StartupReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
Intent in = new Intent();
in.setClass(context, Basic.class);
in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(in);
...
1:联系人显示
Intent intent = new Intent("com.android.contacts.action.LIST_CONTACTS");
startActivity(intent);
2:拨打电话
Intent intent = new Intent(Intent.ACTION_DIAL,Uri.parse("tel:13222222222"));
startActivity(intent);
3:调用拨号程序
Intent intent = new Intent("com.android.phon ...
public class XMLHandler extends DefaultHandler
{
private List<person> persons;
private person person;
private StringBuffer buffer = new StringBuffer();
@Override
public void characters(char[] ch, int start, int length)throws SAXException
{
buffer.append ...
1:DisposePreferences extends PreferenceActivity
2:addPreferencesFromResource(R.xml.preference_setting);
/*
* 单击列表选项 调用的动作
*/
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,Preference preference)
{
if ("user_info".equals(prefe ...
public void disposeImage()
{
ByteArrayOutputStream outputStream = null;
try
{
SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Activity.MODE_PRIVATE);
Editor editor = preferences.edit();
outputStream = new By ...
key_value存储介质,xml文档形式,存入路径data/data/{packagename}/shared_prefs下
private void dispose()
{
/*
* 获取 SharedPreferences 对象
*/
SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Activity.MODE_PRIVATE);
/*
* 获取 Share ...
NotificationManager mNotificationManager = (NotificationManager) myContext.getSystemService(NOTIFICATION_SERVICE);
long when = System.currentTimeMillis();
Notification notification = new Notification(resource, tickerText, when);
...
private LinearLayout layout;
login_button.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0)
{
layout = (LinearLayout) getLayoutInflater().inflate(R.layout.login, null);
Builder builder = new ...
private ProgressDialog pdialog;
private Handler proHandler;
private static int MAX_PROGRESS = 100;
private int progress;
showProgressDialog(ProgressDialog.STYLE_HORIZONTAL);
showProgressDialog(ProgressDialog.STYLE_SPINNER);
private void showProgressDialog(int style)
...
dialog单选,多选框
- 博客分类:
- andriod
private ListView lview;
private String[] provinces = {"海南","湖南","河南","广东","广西","湖北","河北","北京","甘肃"};
private void setListenner()
{
show_dialog2.setOnClickListener(new OnClickList ...
<!-- 自动扫描bean,把作了注解的类转换为bean -->
<context:component-scan base-package="com.huawei.tbsc" annotation-config="true">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-sc ...
<context:component-scan base-package="com.huawei.tbsc.controller" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<bean class=& ...