当前位置: 编程技术>移动开发
本页文章导读:
▪抉择铃声RingtoneManager 选择铃声RingtoneManager
String uri = null;
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_NOTIFICATION);
.........
▪ layout_marginLef代码兑现 layout_marginLef代码实现
RelativeLayout.LayoutParams margin = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
margin.setMargins(0, 0, 0, 7); linearLayoutPare.........
▪ 提示异常的用法 提示错误的用法
EditText test = (EditText)findViewById(R.id.test);
test.setError("错误");
......
[1]抉择铃声RingtoneManager
来源: 互联网 发布时间: 2014-02-18
选择铃声RingtoneManager
String uri = null;
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_NOTIFICATION);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone");
if( uri != null)
{
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
Uri.parse( uri));
}
else
{
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
(Uri)null);
}
startActivityForResult( intent, Set_Ringtone);
if (resultCode == RESULT_OK) {
Uri uri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (uri != null) {
String ringTonePath = uri.toString();
}
}
[2] layout_marginLef代码兑现
来源: 互联网 发布时间: 2014-02-18
layout_marginLef代码实现
RelativeLayout.LayoutParams margin = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
margin.setMargins(0, 0, 0, 7); linearLayoutParent.addView(relativeLayout, margin);
[3] 提示异常的用法
来源: 互联网 发布时间: 2014-02-18
提示错误的用法
EditText test = (EditText)findViewById(R.id.test);
test.setError("错误");
最新技术文章: