0
評価値をfloatとして取得していますが、その値を評価バーとしてインフォウィンドウに表示したいとします。私はmarkeroptions.snippetから評価値を取得し、インフォインドウの評価バーに評価を表示したい
評価値をfloatとして取得していますが、その値を評価バーとしてインフォウィンドウに表示したいとします。私はmarkeroptions.snippetから評価値を取得し、インフォインドウの評価バーに評価を表示したい
パブリックビューgetInfoContents(マーカーマーカー){
String snippet1 = marker.getTitle();
String var = snippet1.substring(6, 9);
try {
if (!var.equals(null)) {
ratingBar1.setRating(Float.parseFloat(String.valueOf(var)));
} else {
Toast.makeText(getBaseContext(), "no ratings", Toast.LENGTH_SHORT).show();
}
} catch (NumberFormatException e) {
System.out.print("no ratings!!!");
}
LatLng ll = marker.getPosition();
placename.setText(marker.getTitle());
tvlat.setText("Longitute" + ll.latitude);
tvlng.setText("Longitute" + ll.longitude);
snippet.setText(marker.getSnippet());
return v;
}
});
marker.title( "評価" +評価)のいくつかをご提示ください。 –
あなたのコード –