parent
55faf2f930
commit
ec7d8f7b5f
@ -1 +0,0 @@
|
|||||||
Subproject commit 7b77e1557b2185a361eb64db6ec6b173a679a10c
|
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module external.linked.project.id="WIFIRobot-android_code_public" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,26 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
|
compileOptions.encoding = "GBK"
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "my.wificar"
|
||||||
|
minSdkVersion 21
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
namespace 'my.wificar'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
|
implementation 'com.google.android.material:material:1.8.0'
|
||||||
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
<uses-permission android:name="adnroid.permission.CHANGE_WIFI_STATE" /> <!-- 在SDCard中创建与删除文件权限 -->
|
||||||
|
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <!-- 往SDCard写入数据权限 -->
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.RESTART_PACKAGES" /> <!-- 在SDCard中创建与删除文件权限 -->
|
||||||
|
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <!-- 往SDCard写入数据权限 -->
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:icon="@drawable/icon"
|
||||||
|
android:label="@string/app_name" >
|
||||||
|
<activity
|
||||||
|
android:name="wificar.SettingsActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name="wificar.MyMainFrm"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:screenOrientation="landscape" >
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity> <!-- 这里是另外一个Activity的配置 -->
|
||||||
|
<activity
|
||||||
|
android:name="wificar.MyVideo"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:screenOrientation="landscape" />
|
||||||
|
<activity
|
||||||
|
android:name="wificar.BgPictureShowActivity"
|
||||||
|
android:label="拍摄的照片"
|
||||||
|
android:screenOrientation="landscape"
|
||||||
|
android:theme="@android:style/Theme.Dialog" />
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,16 @@
|
|||||||
|
package wificar;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import my.wificar.R;
|
||||||
|
|
||||||
|
public class SettingsActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_settings);
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 80 KiB |
@ -0,0 +1,64 @@
|
|||||||
|
<?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="wificar.SettingsActivity">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="180dp"
|
||||||
|
android:layout_height="180dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
android:layout_width="135dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:text="开始"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="135dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:text="设置"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="440dp"
|
||||||
|
android:layout_height="180dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:text="连接模式"
|
||||||
|
android:textSize="20dp"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
android:layout_width="135dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:text="WIFI模式"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="135dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:text="蓝牙模式"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewIP"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="视频地址" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editIP"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="http://192.168.1.1:8080/?action=stream" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/ip"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="192.168.1.1" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/port"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="2001" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_go"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="启动" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
<wificar.MySurfaceView
|
||||||
|
android:id="@+id/mySurfaceViewVideo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/TakePhoto"
|
||||||
|
android:layout_width="66dp"
|
||||||
|
android:layout_height="55dp"
|
||||||
|
android:text="拍照" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_toRightOf="@+id/TakePhoto"
|
||||||
|
android:id="@+id/ViewPhoto"
|
||||||
|
android:layout_width="66dp"
|
||||||
|
android:layout_height="55dp"
|
||||||
|
android:layout_x="90dp"
|
||||||
|
android:text="查看" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_below="@+id/TakePhoto"
|
||||||
|
android:id="@+id/button_forward"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@+id/button_left"
|
||||||
|
android:layout_width="100dip"
|
||||||
|
android:text="前"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_below="@+id/button_forward"
|
||||||
|
android:id="@+id/button_backward"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@+id/button_left"
|
||||||
|
android:layout_width="100dip"
|
||||||
|
android:text="后" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_below="@+id/button_forward"
|
||||||
|
android:id="@+id/button_left"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="100dip"
|
||||||
|
android:text="左"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
|
||||||
|
android:id="@+id/button_right"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@+id/button_backward"
|
||||||
|
android:layout_below="@+id/button_forward"
|
||||||
|
android:layout_width="100dip"
|
||||||
|
android:text="右"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
|
||||||
|
android:id="@+id/button_stop"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="100dip"
|
||||||
|
android:layout_toRightOf="@+id/button_right"
|
||||||
|
android:text="停" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:background="#55000000"
|
||||||
|
>
|
||||||
|
<ImageSwitcher
|
||||||
|
android:id="@+id/switcher"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="350dip"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
/>
|
||||||
|
<Gallery
|
||||||
|
android:id="@+id/mygallery"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:spacing="16dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<declare-styleable name="Gallery">
|
||||||
|
<attr name="android:galleryItemBackground" />
|
||||||
|
</declare-styleable>
|
||||||
|
</resources>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="hello">hello</string>
|
||||||
|
<string name="app_name">智能搜救机器人</string>
|
||||||
|
</resources>
|
@ -0,0 +1,17 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
google()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
google()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
android.nonFinalResIds=false
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.useAndroidX=true
|
@ -0,0 +1 @@
|
|||||||
|
include ':app'
|
Loading…
Reference in new issue