提交 38ecbc5f 编写于 作者: S suhy

添加百度地图api

上级 8128e778
......@@ -41,6 +41,12 @@
<entry key="..\:/Users/suhy/Desktop/github/Android/MyHomeWork/app/src/main/res/layout/fragment_news.xml" value="0.19972826086956522" />
<entry key="..\:/Users/suhy/Desktop/github/Android/MyHomeWork/app/src/main/res/layout/fragment_photo.xml" value="0.16964285714285715" />
<entry key="..\:/Users/suhy/Desktop/github/Android/MyHomeWork/app/src/main/res/layout/userhead_item.xml" value="0.14791666666666667" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_evalute.xml" value="0.2" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_login.xml" value="0.264" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_register.xml" value="0.1793478260869565" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_update_photo.xml" value="0.1793478260869565" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_user_information.xml" value="0.1793478260869565" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/fragment_news.xml" value="0.11822916666666666" />
<entry key="..\:/Users/suhy/Desktop/github/schoolphoto/MyHomeWork/app/src/main/res/drawable/icon__1_.xml" value="0.185546875" />
<entry key="..\:/Users/suhy/Desktop/github/schoolphoto/MyHomeWork/app/src/main/res/layout/activity_evalute.xml" value="0.16530054644808742" />
<entry key="..\:/Users/suhy/Desktop/github/schoolphoto/MyHomeWork/app/src/main/res/layout/activity_historical_records.xml" value="0.176" />
......
......@@ -47,7 +47,14 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.annotation:annotation:1.2.0'
implementation files('libs\\BaiduLBS_Android.jar')
implementation files('libs/mysql-connector-java-5.1.30-bin.jar')
implementation files('libs\\javapoet-1.9.0.jar')
implementation files('libs\\protobuf-java-2.3.0-micro.jar')
implementation files('libs\\protobuf_gens-map.jar')
implementation files('libs\\mysql-connector-java-5.1.30-bin.jar')
implementation files('libs\\component_common_sdk_1.2.0.jar')
implementation files('libs\\gson-2.2.4.jar')
implementation files('libs\\IndoorscapeAlbumPlugin.jar')
implementation files('libs\\org.apache.http.legacy.jar')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
......
......@@ -36,6 +36,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.MyHomeWork"
android:usesCleartextTraffic="true">
<activity
android:name=".activity.ArActivity"
android:exported="false" />
<activity
android:name=".activity.EvaluteActivity"
android:exported="false" />
......
package com.example.myhomework.activity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.myhomework.R;
public class ArActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ar);
}
}
\ No newline at end of file
......@@ -23,11 +23,17 @@ import com.example.myhomework.utils.PermissionsUtils;
import com.example.myhomework.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
public static DrawerLayout drawerLayout;
private ActivityMainBinding binding;
// 调用类实现OnGetDataResultListener监听,用于接收Android AR识别SDK回调数据信息
/**
* 返回景区数据,跳转到景区Activity
* @param arSceneryResponse
*/
public static MainActivity mainActivity;
@Override
......
......@@ -250,7 +250,11 @@ public class UpdatePhotoActivity extends AppCompatActivity {
public void init_location()
{
mBaiduMap.setMyLocationEnabled(true);
mLocationClient = new LocationClient(UpdatePhotoActivity.this);
try {
mLocationClient = new LocationClient(UpdatePhotoActivity.this);
} catch (Exception e) {
e.printStackTrace();
}
//通过LocationClientOption设置LocationClient相关参数
LocationClientOption option = new LocationClientOption();
option.setOpenGps(true); // 打开gps
......
......@@ -24,6 +24,8 @@ public class NewsFragment extends Fragment {
private View mview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -35,11 +37,10 @@ public class NewsFragment extends Fragment {
Bundle savedInstanceState) {
// Inflate the layout for this fragment
mview=inflater.inflate(R.layout.fragment_news, container, false);
ImageView userhead= mview.findViewById(R.id.imageButton_UserHead_toolbar);
ImageView userhead = mview.findViewById(R.id.imageButton_UserHead_toolbar);
RecyclerView recyclerView = mview.findViewById(R.id.recyclerview);
TextView PageName=mview.findViewById(R.id.textview_toolbar);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); //设置为竖直向下
NewItemAdapter newItemAdapter = new NewItemAdapter(getActivity());
recyclerView.setAdapter(newItemAdapter);
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.ArActivity">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册