标签:protect str 案例 action bsp find 天都 cli start
短信大全案例
public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; private String[] smss = { "欲,寄一份情,陪在远方的你。欲,借一首曲,陪若在眼前的你。欲,给一颗心,陪在我心底的你,欲,用这一生,爱慕只在乎的你。", "白色情人节,送你七彩画卷:红色是爱恋,热情只增不减;橙色是希望,放飞共同梦想;黄色是幸福,执手浪漫一生;绿色是信任,忠于彼此不变;蓝色是思念,时刻心儿相连;靛蓝是自由,用责任去守侯;紫色是关爱,体贴照顾不烦。亲爱的,情人节快乐!", "偷我情,盗我心,决定告你上法庭,判你终生嫁给我;懂我心,明我意,跟我办理结婚证;爱上你,恋上你,天天都想拥有你!", "一条红线把缘牵,两情相悦把爱恋,三顾茅庐把你约,四面楚歌情敌战,五花八门哄你欢,六神无主看见你,七上八下想娶你,九死一生都爱你,十全十美来联姻。嫁给我,你就是我的唯一。", "不经意间,相遇;不经意间,相惜;不经意间,刻骨;不经意间,铭记;不经意间,爱上了你。看似不经意,但我真的很在意。", "等待一次日出,需要一天;等待一次月圆,需要一月;等待一次花开,需要一年;等待一次“爱你一生一世”,需要一辈子。亲爱的,你的一辈子,请让我来承担。" }; private ListView lv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv = findViewById(R.id.lv); init(); } private void init() { lv.setAdapter(baseAdapter); lv.setDividerHeight(2); lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { Uri smstouri = Uri.parse("smsto:18534867219"); Intent intent = new Intent(Intent.ACTION_SENDTO, smstouri); intent.putExtra("sms_body",smss[i]); startActivity(intent); } }); } private BaseAdapter baseAdapter = new BaseAdapter() { @Override public int getCount() { return smss.length; } @Override public Object getItem(int i) { return null; } @Override public long getItemId(int i) { return 0; } @Override public View getView(int i, View view, ViewGroup viewGroup) { if (view ==null){ view = new TextView(getApplicationContext()); } ((TextView)view).setTextColor(Color.BLACK); ((TextView)view).setTextSize(23f); ((TextView)view).setText(smss[i]); return view; } }; }
标签:protect str 案例 action bsp find 天都 cli start
原文地址:https://www.cnblogs.com/nangongyibin/p/10229339.html