問題: スプラッシュ スクリーンがあり、5 秒に設定されています。「メインメニュー」を開始するには
スプラッシュ画面が起動し、gps値が見つかりますが、トーストメッセージに表示されますが、編集ボックスに保存したいです。
スプラッシュ スクリーンには xml があります --> starter.xml
Gps 値 (緯度と経度) の編集ボックスには xml があります --> gps_values
コード: これは starter と呼ばれるクラスです:
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
setContentView(R.layout.starter);
LocationResult locationResult = new LocationResult(){
@Override
public void gotLocation(Location location){
EditText lat_view = (EditText)findViewById(R.id.lat_Field);
EditText lng_view = (EditText)findViewById(R.id.lng_Field);
Double lat_source = location.getLatitude();
Double lng_source = location.getLongitude();
lat_view.setText(lat_source.toString());
lng_view.setText(lng_source.toString());
Log.d(TAG, "GPS values =" + lat_view + lng_view);
Toast.makeText(
getApplicationContext(),
"Latitude: "+location.getLatitude()+"\n Longitude: "+location.getLongitude() ,
Toast.LENGTH_SHORT).show();
}
};
MyLocation myLocation = new MyLocation();
myLocation.getLocation(this, locationResult);
final Starter sPlashScreen = this;
mSplashThread = new Thread(){
@Override
public void run(){
try {
synchronized(this){
wait(5000);
}
}
catch(InterruptedException ex){
}
finish();
Intent intent = new Intent();
intent.setClass(sPlashScreen,DashboardMain.class);
startActivity(intent);
finish();
} };
私が言ったように
lat_view と lng_view は gps_values と呼ばれる XML ファイルにあり、starter.xmlと呼ばれるスプラッシュ アクティビティ用の別の xml があります。私が見えないものは誰でも見ることができますか?