我正在使用Google Places API检索有关地点的数据,但无法找到如何获取该地点的图片,Google Places API只提供不一样的图标.例如,我需要您在网络浏览器中搜索Google地图中的地点时获得的照片.通常会有更多来自Panoramio的图片,但Panoramio API只能按位置搜索图片,而不能按特定的餐馆或酒店名称搜索.有任何想法吗?
需要立即帮助!! 用来工作正常的代码,但过了一段时间我注意到评级没有t work anymore and gives "the specified child already has a parent, call removeView() first..." on thealertDialog.show();`line:
///// Rating bar initialising
Context mContext = ShowActivity.this;
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
layout = inflater.inflate(R.layout.custom_rate_dialog, (ViewGroup) findViewById(R.id.layout_root));
final RatingBar rating_indicator = (RatingBar)findViewById(R.id.rating_bar_cafe_indicator);
final float current_rating = (float)mDbHelper.getInt(mRowId, type, RATE_COLUMN);
rating_indicator.setRating(current_rating);
rateDialogBuilder = new AlertDialog.Builder(ShowActivity.this);
rateDialogBuilder.setView(layout);
rateDialogBuilder.setCancelable(false);
rateDialogBuilder.setIcon(R.drawable.rate_star_med_on);
rateDialogBuilder.setTitle("RATE IT!");
rateDialogBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
rating_indicator.setRating(mDbHelper.getInt(mRowId, type, RATE_COLUMN));
((ViewGroup)layout.getParent()).removeView(layout);
dialog.cancel();
}
});
ratingText = …Run Code Online (Sandbox Code Playgroud)