在这里,下面的代码将分享内容onclick。通过其他应用分享内容时,有两种内容:一种是ti-title,另一种是de-description。我想在分享时把标题加粗。那可能吗?
expListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
// TODO Auto-generated method stub
TextView de = (TextView) v.findViewById(R.id.lblListItem);
TextView ti = (TextView) v.findViewById(R.id.lblListHeader);
String selected = ti.getText().toString() + de.getText().toString();
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, selected);
startActivity(Intent.createChooser(intent, "Share via"));
return false;
}
});