TextView设置主题parent是EditText,点击时第一次为获得焦点第二次才执行动作,解决方法为:在xml中设置android:focusableInTouchMode=”false”
设置固定时间出现的线程:
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
动作
}
},5000);设置view超出手机屏幕:
xml中:
android:layout_marginTop=”-200dp”(类似写法)
代码块中:
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
lp.setMargins(0,0,0,-200dp);
ll_bottom.setLayoutParams(lp);Animator基本动画执行后,点击位置不会随着对象位置的改变而改变,可以使用ObjectAnimator代替
drawerlayout可以使用fragment并在xml使用android:layout_gravity=”left”实现自定义侧滑界面
高德地图自定义重定位按钮功能:
按钮的点击事件设置
if (aMapLocationClient!=null){
aMapLocationClient.startLocation();
}
地图的onLocationChanged(AMapLocation aMapLocation) 方法中设置
aMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,18));
Express遇到的问题
最新推荐文章于 2024-05-15 10:59:49 发布