알았어. 그래서 내가 찾은 다른 코드를 보았지만 아무 것도 나에게 도움이되지 못했다. 나는 사용자가 textview를 클릭하고 전화로 걸리게하려고 노력하고있다.전화를 클릭하여 textview를 클릭하십시오.
다음은 자바의 : 그게 문제가 있다면 그래서 내가 볼 수없는 클릭 = 사실 : 나는 또한 안드로이드를 넣었습니다
public class Info extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.moreinfo);
Button appoint =(Button) findViewById(R.id.btnAppoint);
TextView phone =(TextView) findViewById(R.id.phoneTxt);
String url = phone.getText().toString();
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
appoint.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent(Info.this, EmailContact.class));
}
});
phone.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:+"+phone.getText().toString().trim()));
startActivity(callIntent);
}
});
}
}
. 어떤 도움을 주시면 감사하겠습니다!
있습니까? – JoxTraex
("tel : +"+ phone.getText()에서 "phone"아래에 빨간색 밑줄이 표시됩니다. 오류는 없지만 그 행이 사라지기 위해 내가해야하는 것은 무엇입니까? 실제 전화 번호와 아무 것도 아니라 동일한 결과가있는 phoneTxt가 없습니다. – Kodi
컴파일 오류가 발생하여 rrror를 읽으십시오. – JoxTraex