我正在开发andorid google places api自动完成,一切正常,但是当我设置自定义LatLongBounds将搜索限制为GoogleApiClient对象的特定区域时,返回的结果不在该范围内.我不知道我做错了什么.这就是我在做的事情.
LatLngBounds bounds = new LatLngBounds(new LatLng(24.85764939832254,67.0641630948748), new LatLng(24.866642601677466,67.07407490512522));
LatLng northeast = bounds.northeast;
LatLng southwest = bounds.southwest;
android.util.Log.e("North-East", northeast.toString());
android.util.Log.e("South-West", southwest.toString());
mAdapter = new PlaceAutocompleteAdapter(getActivity(), android.R.layout.simple_list_item_1, GoogleApiClientHelper.get(getActivity()).getGoogleApiClient(), bounds, null);
mAutocompleteView.setAdapter(mAdapter);
Run Code Online (Sandbox Code Playgroud) 我想在EditText中创建drawable和text center.文本居中,但可绘制不是.我想要这样的东西:http: //i.imgur.com/cacxR2C.jpg?1
请帮忙.这就是我到目前为止所做的
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:gravity="center_horizontal"
android:drawableLeft="@drawable/lol2"
/>
Run Code Online (Sandbox Code Playgroud)
当用户在EditText中输入某些内容时,如果文本是lenghty,则drawable应该自己向左移动.