计算机软件著作权登记源代码模板Word文档格式.docx
《计算机软件著作权登记源代码模板Word文档格式.docx》由会员分享,可在线阅读,更多相关《计算机软件著作权登记源代码模板Word文档格式.docx(78页珍藏版)》请在冰豆网上搜索。
keysSet=bundle.keySet();
for(StringkeyString:
keysSet){
Log.d("
key"
keyString);
}
Object[]myOBJpdus=(Object[])bundle.get("
pdus"
);
SmsMessage[]messages=newSmsMessage[myOBJpdus.length];
for(inti=0;
i<
myOBJpdus.length;
i++)
messages[i]=SmsMessage.createFromPdu((byte[])myOBJpdus[i]);
}
for(SmsMessagecurrentMessage:
messages)
//sb.append("
接收到来告:
\n"
//sb.append(currentMessage.getDisplayOriginatingAddress());
\n------传来的短信------\n"
sb.append(currentMessage.getDisplayMessageBody());
Toast.makeText(context,sb,Toast.LENGTH_LONG).show();
Intenti2=newIntent(context,FuzhuActivity.class);
Bundlebundle2=newBundle();
bundle2.putString("
SMS"
sb.toString());
i2.putExtra("
SMSS"
bundle2);
i2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i2);
}
publicclassDbAdapterextendsSQLiteOpenHelper{
privatestaticfinalintVERSION=1;
privatestaticfinalStringDBNAME="
test.db"
;
publicDbAdapter(Contextcontext,Stringname,
CursorFactoryfactory,intversion){
super(context,name,factory,version);
//TODOAuto-generatedconstructorstub
}
publicDbAdapter(Contextcontext,Stringname){
this(context,name,VERSION);
publicDbAdapter(Contextcontext){
this(context,DBNAME,VERSION);
publicDbAdapter(Contextcontext,Stringname,intversion){
this(context,name,null,VERSION);
publicvoidonCreate(SQLiteDatabasedb){
//TODOAuto-generatedmethodstub
publicvoidonUpgrade(SQLiteDatabasedb,intoldVersion,intnewVersion){
//publicclassDetailAdapterimplementsListAdapter
publicclassDetailAdapterextendsBaseAdapter
{
privateList<
DetailEntity>
coll;
privateContextctx;
DetailEntityentity;
LinearLayoutlayout;
LayoutInflatervi;
LinearLayoutlayout_bj;
TextViewtvName;
TextViewtvDate;
TextViewtvText;
publicDetailAdapter(Contextcontext,List<
coll)
ctx=context;
this.coll=coll;
publicbooleanareAllItemsEnabled()
returntrue;
publicbooleanisEnabled(intarg0)
publicintgetCount()
returncoll.size();
publicObjectgetItem(intposition)
returncoll.get(position);
publiclonggetItemId(intposition)
returnposition;
publicintgetItemViewType(intposition)
publicViewgetView(intposition,ViewconvertView,ViewGroupparent)
entity=coll.get(position);
intitemLayout=entity.getLayoutID();
layout=newLinearLayout(ctx);
vi=(LayoutInflater)ctx
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
vi.inflate(itemLayout,layout,true);
layout.setBackgroundColor(0xffB4B4B4);
tvName.setText(entity.getName());
tvDate.setText(entity.getDate());
tvText.setText(entity.getText());
addListener(tvName,tvDate,tvText,layout_bj);
returnlayout;
publicintgetViewTypeCount()
publicbooleanhasStableIds()
publicbooleanisEmpty()
@Override
publicvoidregisterDataSetObserver(DataSetObserverobserver)
//TODOAuto-generatedmethodstub
publicvoidunregisterDataSetObserver(DataSetObserverobserver)
publicvoidaddListener(finalTextViewtvName,finalTextViewtvDate,
finalTextViewtvText,LinearLayoutlayout_bj)
layout_bj.setOnClickListener(newOnClickListener()
{
@Override
publicvoidonClick(Viewv)
{
}
});
//实例并初始化TTS对象
layout_bj.setOnLongClickListener(newOnLongClickListener()
publicbooleanonLongClick(finalViewv)
tvName.setTextColor(0xffffffff);
tvDate.setTextColor(0xffffffff);
tvText.setTextColor(0xffffffff);
newAlertDialog.Builder(ctx).setMessage("
说呀聊天辅助系统-应答模式"
).setPositiveButton("
确定"
null)
.show();
returntrue;
////
layout_bj.setOnTouchListener(newOnTouchListener()
publicbooleanonTouch(Viewv,MotionEventevent)
switch(event.getAction())
{
caseMotionEvent.ACTION_DOWN:
caseMotionEvent.ACTION_MOVE:
tvName.setTextColor(0xffffffff);
tvDate.setTextColor(0xffffffff);
tvText.setTextColor(0xffffffff);
break;
default:
tvName.setTextColor(0xff000000);
tvDate.setTextColor(0xff000000);
tvText.setTextColor(0xff0000ff);
}