コード例 #1
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   BaiduService.getInstance().StopLocation();
   baiduLBSListener = null;
   handler = null;
 }
コード例 #2
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_publish);
   initUI();
   BaiduService.getInstance().StartLocation(baiduLBSListener);
   handler = new MyHandler(PublishActivity.this);
 }
コード例 #3
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.et_text:
       break;
     case R.id.iv_img:
       pickImgClick();
       break;
     case R.id.tv_location:
       if (bIsLocateFailed) {
         bIsLocateFailed = false;
         BaiduService.getInstance().StartLocation(baiduLBSListener);
       }
       break;
     case R.id.layout_background:
       hiddenKeyBoard(v);
       break;
   }
 }