我做了一个TextView textView = (TextView) findViewById(R.id.textView);
SpannableString user = new SpannableString("Mike");
ClickableSpan userClickableSpan = new ClickableSpan() {
@Override
public void onClick(View textView) {
//click on user
}
};
user.setSpan(userClickableSpan, 0, user.length(),
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
SpannableString commentedOnUser = new SpannableString("Davids");
ClickableSpan commentedOnUserClickableSpan = new ClickableSpan() {
@Override
public void onClick(View textView) {
//click on commentedOnUser
}
};
commentedOnUser.setSpan(commentedOnUserClickableSpan, 0, commentedOnUser.length(),
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
SpannableString place = new SpannableString("Pizza Planet");
ClickableSpan placeClickableSpan = new ClickableSpan() {
@Override
public void onClick(View textView) {
//click on place
}
};
place.setSpan(placeClickableSpan, 0, place.length(),
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setHighlightColor(Color.TRANSPARENT);
textView.setText(user);
textView.append(" is has commented on ");
textView.append(commentedOnUser);
textView.append(" review at ");
textView.append(place);
,但我没有看到任何暗示我可以让客户做这件事。
我使用的是版本9.4
\?
我的想法是,我希望能够在psql客户端中运行大型查询,并通过从服务器一次一个地传输结果而不是一次性获取所有结果来限制客户端的内存消耗。 / p>