无法给text view设置可变文本,log日志有些不打印,activity不跳转,可远程协助。
文本设置:
String province=aMapLocation.getProvince();
String city=aMapLocation.getCity();
String district=aMapLocation.getDistrict();
String streetNumber=aMapLocation.getStreetNum();
String text="经度: "+Longitude+" "
+"纬度: "+latitude+" "
+"详细位置: "+province+city+district+streetNumber;
_tv_srcAddr = (EditText) findViewById(R.id.tv_passenger_srcAddr);
_tv_srcAddr.setText(text);
Log.e("位置",text);
对应xml:
<EditText
android:id="@+id/tv_passenger_srcAddr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="等待服务器定位地址..."
android:textSize="16sp"
tools:ignore="MissingConstraints" />
点击跳转:
_tz.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(PassengerActivity.this, GoodsInfoActivity.class);
statActivity(intent);
}
private void statActivity(Intent intent) {
}
对应xml:
1.