package love.dragonist.beebeego.activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.constraint.ConstraintLayout;
import android.support.constraint.ConstraintSet;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.transition.AutoTransition;
import android.transition.TransitionManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.baidu.mapapi.map.MapStatusUpdateFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MarkerOptions;
import com.baidu.mapapi.map.PolylineOptions;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.model.LatLngBounds;
import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult;
import com.baidu.mapapi.walknavi.WalkNavigateHelper;
import com.baidu.mapapi.walknavi.adapter.IWEngineInitListener;
import com.baidu.mapapi.walknavi.adapter.IWRoutePlanListener;
import com.baidu.mapapi.walknavi.model.WalkRoutePlanError;
import com.baidu.mapapi.walknavi.params.WalkNaviLaunchParam;
import com.baidu.mapapi.walknavi.params.WalkRouteNodeInfo;
import com.baidu.navisdk.adapter.BNRoutePlanNode;
import com.baidu.navisdk.adapter.BaiduNaviManagerFactory;
import com.google.gson.Gson;
import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
import love.dragonist.beebeego.R;
import love.dragonist.beebeego.bean.InsideRoute;
import love.dragonist.beebeego.bean.InsideRoutesHolder;
import love.dragonist.beebeego.bean.Route;
import love.dragonist.beebeego.bean.Step;
import love.dragonist.beebeego.bean.User;
import love.dragonist.beebeego.bean.Way;
import love.dragonist.beebeego.net.RecordNet;
import love.dragonist.beebeego.net.Transit;
import love.dragonist.beebeego.util.Format;
import love.dragonist.beebeego.view.InsideCityView;
import love.dragonist.beebeego.view.InterCityView;
import love.dragonist.beebeego.view.ItemInsideView;
public class BriefResultActivity extends AppCompatActivity {
private MapView mapView;
private ConstraintLayout constraintWhole;
private ConstraintLayout constraintTitle;
private TextView textChangeTime;
private TextView textPrice;
private TextView textTime;
private TextView textSt1;
private TextView textEn1;
private TextView textSt2;
private TextView textEn2;
private TextView textSt3;
private TextView textEn3;
private InterCityView interCityView1;
private InterCityView interCityView2;
private InterCityView interCityView3;
private InsideCityView insideCityView1;
private InsideCityView insideCityView2;
private InsideCityView insideCityView3;
private InsideCityView insideCityView4;
private LinearLayout linear1;
private LinearLayout linear2;
private LinearLayout linear3;
private LinearLayout linearCollection;
private LinearLayout linearGoing;
private ConstraintSet constraintSet;
private AutoTransition transition;
private BaiduMap map;
private Gson gson = new Gson();
private Route route;
private ReverseGeoCodeResult departPosition;
private ReverseGeoCodeResult arrivePosition;
private List<InsideRoute> insideRoutes1;
private List<InsideRoute> insideRoutes2;
private List<InsideRoute> insideRoutes3;
private List<InsideRoute> insideRoutes4;
private boolean expended = false;
private User user;
private String date;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_brief_result);
initData();
initView();
initMap();
initListener();
}
private void initData() {
constraintSet = new ConstraintSet();
transition = new AutoTransition();
Intent intent = getIntent();
route = gson.fromJson(intent.getStringExtra("route"), Route.class);
departPosition = gson.fromJson(intent.getStringExtra("departPosition"), ReverseGeoCodeResult.class);
arrivePosition = gson.fromJson(intent.getStringExtra("arrivePosition"), ReverseGeoCodeResult.class);
user = gson.fromJson(intent.getStringExtra("user"), User.class);
}
private void initView() {
constraintWhole = findViewById(R.id.brief_constraint_whole);
constraintSet.clone(constraintWhole);
constraintTitle = findViewById(R.id.brief_constraint_1);
mapView = findViewById(R.id.brief_mapView);
textChangeTime = findViewById(R.id.brief_text_changeTimes);
if (route.getSecondWay() == null) textChangeTime.setText("换乘0次");
else if (route.getThirdWay() == null) textChangeTime.setText("换乘1次");
else textChangeTime.setText("换乘2次");
textPrice = findViewById(R.id.brief_text_money);
textPrice.setText("¥" + route.getPrice() + "起");
textTime = findViewById(R.id.brief_text_time);
textTime.setText(getDurationFormat(route.getTime()));
textSt1 = findViewById(R.id.brief_text_start_1);
textSt2 = findViewById(R.id.brief_text_start_2);
textSt3 = findViewById(R.id.brief_text_start_3);
textEn1 = findViewById(R.id.brief_text_end_1);
textEn2 = findViewById(R.id.brief_text_end_2);
textEn3 = findViewById(R.id.brief_text_end_3);
linear1 = findViewById(R.id.brief_linear_1);
linear2 = findViewById(R.id.brief_linear_2);
linear3 = findViewById(R.id.brief_linear_3);
linearCollection = findViewById(R.id.brief_linear_collection);
linearGoing = findViewById(R.id.brief_linear_going);
insideCityView1 = findViewById(R.id.brief_insidecity_1);
interCityView1 = findViewById(R.id.brief_intercity_1);
insideCityView2 = findViewById(R.id.brief_insidecity_2);
interCityView2 = findViewById(R.id.brief_intercity_2);
insideCityView3 = findViewById(R.id.brief_insidecity_3);
interCityView3 = findViewById(R.id.brief_intercity_3);
insideCityView4 = findViewById(R.id.brief_insidecity_4);
Intent intent = getIntent();
if (intent.hasExtra("record")) {
linearCollection.setEnabled(false);
linearGoing.setEnabled(false);
} else {
date = intent.getStringExtra("date");
}
}
private void initMap() {
map = mapView.getMap();
if (route.getSecondWay() == null) {
initOneWay();
} else if (route.getThirdWay() == null) {
initTwoWay();
} else {
initThreeWay();
}
LatLngBounds.Builder builder = new LatLngBounds.Builder();
builder.include(departPosition.getLocation());
builder.include(arrivePosition.getLocation());
map.animateMapStatus(MapStatusUpdateFactory.newLatLngBounds(builder.build()));
map.animateMapStatus(MapStatusUpdateFactory.zoomTo(6.0f));
}
private void initListener() {
//第一个城市之间的交通的切换按钮
interCityView1.getBtnChange().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivityForResult(new Intent(BriefResultActivity.this, ChooseInterActivity.class)
.putExtra("departStation", route.getFirstWay().getFromStation().getName())
.putExtra("arriveStation", route.getFirstWay().getToStation().getName()), 21);
}
});
//第二个城市之间的交通的切换按钮
interCityView2.getBtnChange().setOnClickListener(new View.OnClickListener
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip课程设计-基于java开发的旅客行程智能推荐系统源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
课程设计-基于java开发的旅客行程智能推荐系统源码.zip (322个子文件)
onsdk_all.aar 25.79MB
NaviTts.aar 2.81MB
app-release.apk 57.27MB
gradlew.bat 2KB
.gitignore 203B
.gitignore 7B
build.gradle 2KB
build.gradle 549B
settings.gradle 15B
gradlew 5KB
BaiduLBS_Android.jar 3.32MB
component_common_sdk_1.0.0.jar 228KB
javapoet-1.9.0.jar 91KB
gradle-wrapper.jar 53KB
galaxy_lite.jar 31KB
EventBus.jar 29KB
httpmime-4.1.2.jar 26KB
IndoorscapeAlbumPlugin.jar 25KB
BriefResultActivity.java 46KB
MainActivity.java 21KB
RecommendFragment.java 14KB
CustomFragment.java 13KB
ResultActivity.java 12KB
MineActivity.java 11KB
LogRegActivity.java 10KB
NonstopFragment.java 9KB
RecordNet.java 8KB
RecordFragment.java 7KB
GoingListAdapter.java 6KB
ResultListAdapter.java 6KB
Way.java 6KB
ChooseInterActivity.java 6KB
RecordListAdapter.java 6KB
Route.java 6KB
MyMonthView.java 5KB
NonstopListAdapter.java 5KB
InsideBrief2Activity.java 5KB
InsideBriefActivity.java 5KB
MyWeekView.java 4KB
Transit.java 4KB
Nonstop.java 4KB
WelcomeActivity.java 4KB
AccountFragment.java 4KB
InsideActivity.java 4KB
LogReg.java 4KB
ItemInsideView.java 4KB
RoutePlan.java 3KB
Station.java 3KB
Record.java 3KB
InsideCityView.java 3KB
ChooseInsideActivity.java 3KB
DefaultApplication.java 2KB
InterCityView.java 2KB
ChooseInsideView.java 2KB
ChoosePositionListAdapter.java 2KB
Step.java 2KB
Weather.java 2KB
Detail.java 2KB
InsideRoute.java 2KB
WebActivity.java 2KB
SystemFragment.java 1KB
TransportationView.java 1KB
User.java 1KB
GuideActivity.java 1KB
Format.java 1KB
ExampleInstrumentedTest.java 730B
Path.java 665B
Price_detail.java 651B
ResultViewPagerAdapter.java 630B
MineViewPagerAdapter.java 626B
Vehicle_info.java 533B
ExampleUnitTest.java 384B
InsideRoutesHolder.java 292B
ConnectionCode.java 194B
Addr.java 190B
MessageCode.java 163B
RouteCode.java 161B
ic_bg_road.jpg 49KB
ic_bg_bus.jpg 35KB
output.json 234B
BaiduBikeNavi_Resource_v5_4_0.png 823KB
bg_welcome.png 423KB
logreg_bg.png 276KB
result_bg.png 125KB
ic_welcome_location.png 28KB
logreg_locate.png 27KB
logo.png 20KB
ic_bee_logo.png 20KB
line_orange.png 18KB
phone.png 16KB
password.png 16KB
selfinfo.png 15KB
ic_launcher_round.png 15KB
ic_launcher_round.png 10KB
ic_launcher.png 9KB
ic_launcher_round.png 7KB
ic_launcher.png 6KB
ic_launcher_round.png 5KB
default_portrait.png 5KB
ic_launcher.png 4KB
共 322 条
- 1
- 2
- 3
- 4
资源评论
z同学的编程之路
- 粉丝: 1859
- 资源: 2130
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 沈丘盛世龙门图纸符合规范化
- HM3400-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 基于python+streamlit联邦学习进行高校学生成绩预测研究python源码+项目说明+模型+数据.zip
- HM3400D-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- HM3400B-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- spring-boot示例
- 搜集火星资源.py
- JAR应用启动停止脚本化解决方案.zip
- 配合eclipse svn插件subclipse-4.3.4版本的javahl
- Bash脚本教程:如何优雅地停止JAR服务.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功