diff --git a/app/src/main/java/com/example/nemophila/MainActivity.java b/app/src/main/java/com/example/nemophila/MainActivity.java index 1e02e84..922556b 100644 --- a/app/src/main/java/com/example/nemophila/MainActivity.java +++ b/app/src/main/java/com/example/nemophila/MainActivity.java @@ -71,16 +71,6 @@ nemophila = (Nemophila) this.getApplication(); - //現在地ボタン - ImageButton button1 = findViewById(R.id.currentButton); - // lambda式 - button1.setOnClickListener( v -> { - Log.d("debug", "currentbutton, 現在地にカメラを移動"); - System.out.println(shopsViewModel.getShopsLiveData().getValue()); - //現在地にカメラを移動 - zoomMap(currentLatlng.latitude, currentLatlng.longitude); - }); - ImageButton myPageButton = findViewById(R.id.myPageButton); // lambda式 myPageButton.setOnClickListener( v -> { @@ -358,14 +348,15 @@ public void onLocationChanged(Location location) { //初期画面は現在地を中心にするため... if (currentLatlng == null){ - zoomMap(location.getLatitude(), location.getLongitude()); + //↓現在地ロード後画面中心を現在地にする場合 + //zoomMap(location.getLatitude(), location.getLongitude()); //ロード画面の終了 findViewById(R.id.LL_Load).setVisibility(View.GONE); - findViewById(R.id.currentButton).setVisibility(View.); - //現在地ボタン + //現在地ボタンを表示 + findViewById(R.id.currentButton).setVisibility(View.VISIBLE); ImageButton button1 = findViewById(R.id.currentButton); - // lambda式 + button1.setOnClickListener( v -> { Log.d("debug", "currentbutton, 現在地にカメラを移動"); System.out.println(shopsViewModel.getShopsLiveData().getValue());