Skip to content

Commit

Permalink
上传了效果图
Browse files Browse the repository at this point in the history
  • Loading branch information
gaolei committed Mar 9, 2017
1 parent 6d717d4 commit 9816e04
Show file tree
Hide file tree
Showing 49 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion BiuBike/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BiuBike/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
compile files('libs/baidumapapi_base_v4_1_1.jar')
compile files('libs/baidumapapi_map_v4_1_1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile files('libs/baidumapapi_util_v4_1_1.jar')
compile files('libs/gson-2.2.1.jar')
compile project(':xrecyclerview')
Expand Down
18 changes: 6 additions & 12 deletions BiuBike/app/src/main/java/com/biubike/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class MainActivity extends BaseActivity implements View.OnClickListener,
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// requestWindowFeature(Window.FEATURE_NO_TITLE);
SDKInitializer.initialize(getApplicationContext());
SDKInitializer.initialize(getApplicationContext());//在Application的onCreate()不行,必须在activity的onCreate()中
setContentView(R.layout.activity_main);
Log.d("gaolei", "MainkActivity------------onCreate---------" + System.currentTimeMillis());
initMap();
Expand Down Expand Up @@ -172,14 +172,12 @@ private void initMap() {
LocationClientOption option = new LocationClientOption();
option.setOpenGps(true); // 打开gps
option.setCoorType("bd09ll"); // 设置坐标类型
option.setScanSpan(5000);
option.setIsNeedAddress(true);
option.setScanSpan(5000);//设置onReceiveLocation()获取位置的频率
option.setIsNeedAddress(true);//如想获得具体位置就需要设置为true
mlocationClient.setLocOption(option);
mlocationClient.start();
mCurrentMode = MyLocationConfiguration.LocationMode.FOLLOWING;

mBaiduMap
.setMyLocationConfigeration(new MyLocationConfiguration(
mBaiduMap.setMyLocationConfigeration(new MyLocationConfiguration(
mCurrentMode, true, null));
myOrientationListener = new MyOrientationListener(this);
//通过接口回调来实现实时方向的改变
Expand Down Expand Up @@ -218,26 +216,22 @@ public void onReceiveLocation(BDLocation bdLocation) {
currentLL = new LatLng(bdLocation.getLatitude(),
bdLocation.getLongitude());
startNodeStr = PlanNode.withLocation(currentLL);
//option.setScanSpan(5000),每隔5000ms这个方法就会调用一次,而有些我们只想调用一次,所以要判断一下isFirstLoc
if (isFirstLoc) {
isFirstLoc = false;
LatLng ll = new LatLng(bdLocation.getLatitude(),
bdLocation.getLongitude());
MapStatus.Builder builder = new MapStatus.Builder();
//地图缩放比设置为18
builder.target(ll).zoom(18.0f);
mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build()));

changeLatitude = bdLocation.getLatitude();
changeLongitude = bdLocation.getLongitude();


if (!isServiceLive) {
addOverLayout(currentLatitude, currentLongitude);
}
}
}

public void onReceivePoi(BDLocation poiLocation) {
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public void onCreate(Bundle savedInstanceState) {
routeRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallScale);
routeRecyclerView.setArrowImageView(R.drawable.iconfont_downgrey);
routeRecyclerView.setPullRefreshEnabled(false);

// View header = LayoutInflater.from(this).inflate(R.layout.recyclerview_header, (ViewGroup)findViewById(android.R.id.content),false);
// routeRecyclerView.addHeaderView(header);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,4 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
}
return super.onKeyDown(keyCode, event);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.ScrollView;

import java.util.ArrayList;
import java.util.List;
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# BiuBike
shared bike


![image](https://github.com/gaoleiandroid1201/BiuBike/raw/master/material/screenshots/2.gif)
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added material/screenshots/2.gif
File renamed without changes.

0 comments on commit 9816e04

Please sign in to comment.