Express遇到的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Mr_shashadudu/article/details/74340840
  1. TextView设置主题parent是EditText,点击时第一次为获得焦点第二次才执行动作,解决方法为:在xml中设置android:focusableInTouchMode=”false”

  2. 设置固定时间出现的线程:
    new Handler().postDelayed(new Runnable() {
    @Override
    public void run() {
    ////动作
    }
    },5000);

  3. 设置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);

  4. Animator基本动画执行后,点击位置不会随着对象位置的改变而改变,可以使用ObjectAnimator代替

  5. drawerlayout可以使用fragment并在xml使用android:layout_gravity=”left”实现自定义侧滑界面

  6. 高德地图自定义重定位按钮功能:
    按钮的点击事件设置
    if (aMapLocationClient!=null){
    aMapLocationClient.startLocation();
    }
    地图的onLocationChanged(AMapLocation aMapLocation) 方法中设置
    aMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,18));

猜你喜欢

转载自blog.csdn.net/Mr_shashadudu/article/details/74340840