1
我想映射一個應用程序,但我的代碼中更改全局變量時出現問題。我在法捆改變全局變量全球經緯度在if else
怎麼辦..請給我solution..thank你..如何更改Android中的全局變量
public class Arahkan extends FragmentActivity {
private static final int Direction = Menu.FIRST + 1;
private static final int Exit = Menu.FIRST + 2;
GoogleMap map;
String tampil2 = getIntent().getExtras().getString("key");
public LatLng JAKARTA = new LatLng(-6.175467640504223,106.82718157768248); // HOW TO CHANGE THIS.. ??
class Data {
public Data(float lng, float lat, String title, String snippet, String icon) {
super();
this.lat = (float)lat;
this.lng = (float)lng;
this.title = title;
this.snippet = snippet;
this.icon = icon;
}
float lat;
float lng;
String title;
String snippet;
String icon;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.peta);
if(tampil2.equalsIgnoreCase("coba")){
//HERE... HOW TO CHANGE VALUE FROM VARIABEL LATLNG JAKARTA ??
}
if(tampil2.equalsIgnoreCase("bisa")){
}
請幫我...
所以最新你的問題?你有錯誤嗎? – 2013-05-08 16:31:22