据我所知Google不允许开发人员自定义地方选择器布局,
所以我想制作一个像下面这张照片的地方选择器.
它是来自deliveroo应用程序,我使用地图api,但它不完全像这张照片.
这个选择器就像地方选择器api它是定制的.
这是我的代码:
public class Map extends AppCompatActivity implements OnMapReadyCallback {
private GoogleMap mMap;
private LatLng markerLatLong;
private static final int REQUEST_CODE_LOCATION_ENABLE = 1;
private static final int PLACE_AUTOCOMPLETE_REQUEST_CODE = 2;
private static String TAG = Map.class.getSimpleName();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
setToolbar();
setFragment();
}
public void setFragment() {
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
public void setToolbar() {
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} …Run Code Online (Sandbox Code Playgroud) 我想在导航视图标题的项目中添加onClickListener,例如更改TextView文本或为ImageView设置图像.
我正在使用laravel 5在子域中实现api,例如:api.domain.com
我将laravel从本地复制到共享主机。在public_html / api文件夹中。
在本地eveything工作正常,但在服务器中出现此错误:
Connector.php 55行中的PDOException:SQLSTATE [HY000] [2002]由于安全原因,已禁止在远程端口3306上建立tcp连接。
当我尝试通过laravel 5连接数据库时。
我该怎么办?