diff --git a/app/src/main/java/com/example/nemophila/MapsActivity.java b/app/src/main/java/com/example/nemophila/MapsActivity.java index aede3f0..1256256 100644 --- a/app/src/main/java/com/example/nemophila/MapsActivity.java +++ b/app/src/main/java/com/example/nemophila/MapsActivity.java @@ -269,7 +269,12 @@ textView.setText(item.text); CheckBox checkBox = convertView.findViewById(R.id.filter_checkbox); checkBox.setOnCheckedChangeListener(null); - checkBox.setChecked(item.isChecked); + //チェック済みの項目をチェックにしておく + if(isGenre) { + checkBox.setChecked(nemophila.getSelectGenres().contains(item.getText())); + } else { + checkBox.setChecked(nemophila.getSelectFriends().contains(item.getText())); + } // チェックボックスを押したときの処理 checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { diff --git a/app/src/main/java/com/example/nemophila/MapsFragment.java b/app/src/main/java/com/example/nemophila/MapsFragment.java index 212503d..0ed3186 100644 --- a/app/src/main/java/com/example/nemophila/MapsFragment.java +++ b/app/src/main/java/com/example/nemophila/MapsFragment.java @@ -266,29 +266,6 @@ //2回目移行 currentMarker.setPosition(current_location); } -// -// // マップに貼り付ける BitmapDescriptor生成 -// BitmapDescriptor descriptor = BitmapDescriptorFactory.fromResource(R.drawable.icon_current); -// //Drawable ic_current = ResourcesCompat.getDrawable(getResources(),R.drawable.ic_current_location,null); -// -// // 貼り付設定 -// GroundOverlayOptions overlayOptions = new GroundOverlayOptions(); -// overlayOptions.image(descriptor); -// -// //public GroundOverlayOptions anchor (float u, float v) -// // (0,0):top-left, (0,1):bottom-left, (1,0):top-right, (1,1):bottom-right -// overlayOptions.anchor(0.5f, 0.5f); -// -// // 張り付け画像の大きさ メートル単位 -// // public GroundOverlayOptions position(LatLng location, float width, float height) -// overlayOptions.position(current_location, 200f, 200f); -// -// // マップに貼り付け・アルファを設定 -// currentOverlay = mMap.addGroundOverlay(overlayOptions); -// -// // 透明度 -// assert currentOverlay != null; -// currentOverlay.setTransparency(0.8F); }