Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b208a1853a | ||
|
|
12697ab05a | ||
|
|
c2ad9c6847 | ||
|
|
a111765677 | ||
|
|
4c0c4416fc |
@@ -2,8 +2,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.example.greenwatch">
|
package="com.example.greenwatch">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
@@ -11,6 +9,9 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.GreenWatch">
|
android:theme="@style/Theme.GreenWatch">
|
||||||
|
<activity
|
||||||
|
android:name=".Beschleunigungssensor"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|||||||
@@ -1,4 +1,188 @@
|
|||||||
package com.example.greenwatch;
|
package com.example.greenwatch;
|
||||||
|
|
||||||
public class Beschleunigungssensor {
|
|
||||||
}
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.hardware.Sensor;
|
||||||
|
import android.hardware.SensorEvent;
|
||||||
|
import android.hardware.SensorEventListener;
|
||||||
|
import android.hardware.SensorManager;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class Beschleunigungssensor extends AppCompatActivity implements SensorEventListener{
|
||||||
|
|
||||||
|
private SensorManager bsmanager;
|
||||||
|
private ArrayList<Float> Gesamt_be;
|
||||||
|
private int sensorType = Sensor.TYPE_GYROSCOPE, zaehler_runde =0, listen_groesse = 500, kalibrieren, Offset_shared = 0, shared_merk, mittelwertsumme_shared;
|
||||||
|
private Sensor sens, sensor_l;
|
||||||
|
private float x_value = 0, y_value, z_value, Vorbesetzung = 0, gesamt_runde =0;
|
||||||
|
private double Schwellwert = 0.15, mittelwertsumme = 0.0, Offset = 0.1;
|
||||||
|
String Daten, Warnung, Zeitstempel, Array_shared;
|
||||||
|
private final static String KEY_kalibirieren = "KEY_KALIBRIEREN_"+Beschleunigungssensor.class.getSimpleName();
|
||||||
|
private final static String KEY_Gesamt_be = "KEY_GESAMT_BE_"+Beschleunigungssensor.class.getSimpleName();
|
||||||
|
private final static String KEY_Offset = "KEY_OFFSET_"+Beschleunigungssensor.class.getSimpleName();
|
||||||
|
private final static String KEY_Mittelwertsumme = "KEY_MITTELWERTSUMME_"+Beschleunigungssensor.class.getSimpleName();
|
||||||
|
TextView Daten_Bsensor, Warnung_Bsensor, test;
|
||||||
|
private boolean toggle = true, ts_setzen = true, start_messen;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_beschleunigungssensor);
|
||||||
|
|
||||||
|
Daten_Bsensor = (TextView) findViewById(R.id.DatenBsensor);
|
||||||
|
Warnung_Bsensor = (TextView) findViewById(R.id.WarnungBsensor);
|
||||||
|
test = (TextView) findViewById(R.id.test);
|
||||||
|
|
||||||
|
bsmanager = (SensorManager) getSystemService(SENSOR_SERVICE);
|
||||||
|
if (bsmanager.getSensorList(Sensor.TYPE_GYROSCOPE).size() == 0) {
|
||||||
|
sens = null;
|
||||||
|
Daten = "kein B Sensor voranden";
|
||||||
|
} else {
|
||||||
|
sens = bsmanager.getSensorList(sensorType).get(0);
|
||||||
|
}
|
||||||
|
Gesamt_be = new ArrayList<Float>();
|
||||||
|
for (int i = 0; i < listen_groesse ; i++){
|
||||||
|
Gesamt_be.add(Vorbesetzung);
|
||||||
|
}
|
||||||
|
kalibrieren = 0;
|
||||||
|
start_messen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getTimestamp(){
|
||||||
|
Long tslong = System.currentTimeMillis();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||||
|
Date date = new Date(tslong);
|
||||||
|
String result = sdf.format(date);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSensorChanged(SensorEvent event) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("x=").append(event.values[0])//.append(event.timestamp)
|
||||||
|
.append("\ny=").append(event.values[1])
|
||||||
|
.append("\nz=").append(event.values[2]);
|
||||||
|
Daten = sb.toString();
|
||||||
|
Daten_Bsensor.setText(Daten);
|
||||||
|
gesamt_runde = event.values[0] + event.values[1] + event.values[2];
|
||||||
|
Gesamt_be.remove(zaehler_runde);
|
||||||
|
Gesamt_be.add(zaehler_runde, gesamt_runde);
|
||||||
|
mittelwertsumme = 0.0;
|
||||||
|
|
||||||
|
//Mittelwert des Arrays berechnen
|
||||||
|
for (int i = 0; i < listen_groesse; i++){
|
||||||
|
if (Gesamt_be.get(i) < 0){
|
||||||
|
mittelwertsumme += (Gesamt_be.get(i) * (-1));
|
||||||
|
}else {
|
||||||
|
mittelwertsumme += Gesamt_be.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mittelwertsumme = mittelwertsumme/listen_groesse;
|
||||||
|
if (kalibrieren < listen_groesse){
|
||||||
|
Offset = mittelwertsumme;
|
||||||
|
kalibrieren++;
|
||||||
|
}else {
|
||||||
|
start_messen = true;
|
||||||
|
}
|
||||||
|
StringBuilder testsb = new StringBuilder();
|
||||||
|
testsb.append(mittelwertsumme);
|
||||||
|
String tests = testsb.toString();
|
||||||
|
test.setText(tests);
|
||||||
|
|
||||||
|
if((mittelwertsumme > (Schwellwert+Offset) ) & (ts_setzen == true) &(start_messen == true)){
|
||||||
|
Zeitstempel = getTimestamp();
|
||||||
|
StringBuilder ts = new StringBuilder();
|
||||||
|
ts.append(Zeitstempel)
|
||||||
|
.append(", Gruppe3")
|
||||||
|
.append(", An")
|
||||||
|
.append(", Bewegung, ")
|
||||||
|
.append(mittelwertsumme);
|
||||||
|
Warnung = ts.toString();
|
||||||
|
Warnung_Bsensor.setText(Warnung);
|
||||||
|
ts_setzen = false;
|
||||||
|
}else if((mittelwertsumme > (Schwellwert+Offset)) & (ts_setzen == false)){
|
||||||
|
} else if ((mittelwertsumme < (Schwellwert+Offset)) & (ts_setzen == false)) {
|
||||||
|
Warnung_Bsensor.setText("");
|
||||||
|
ts_setzen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (zaehler_runde < (listen_groesse -1)){
|
||||||
|
zaehler_runde++;
|
||||||
|
}else {
|
||||||
|
zaehler_runde = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//mittelwertsumme ist kein int in diesem programm
|
||||||
|
//shared prefenrences: bei Kippen speichern -> nochmal neu klalibrieren? -> eig ja, weil neuer Standort
|
||||||
|
//Vorbelegung nicht nochmal neu vornehmen -> aus onCreate Funktion raus -> hilfsvariablen auch in shared preferences speichern
|
||||||
|
@Override
|
||||||
|
public void onAccuracyChanged(Sensor sensor, int accuracy) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (sens != null) {
|
||||||
|
if (bsmanager.registerListener(this, sens, SensorManager.SENSOR_DELAY_GAME)) {
|
||||||
|
Daten = "Wir haben uns beim Sensor angemeldet";
|
||||||
|
} else {
|
||||||
|
Daten = "Das anmelden hat nicht geklappt";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//SharedPreferences p = getPreferences(Context.MODE_PRIVATE);
|
||||||
|
//mittelwertsumme_shared = p.getInt(KEY_Mittelwertsumme, 0);
|
||||||
|
//kalibrieren = p.getInt(KEY_kalibirieren, 0);
|
||||||
|
//Offset_shared = p.getInt(KEY_Offset, 0 );
|
||||||
|
//Array_shared = p.getString(KEY_Gesamt_be, "");
|
||||||
|
|
||||||
|
//mittelwertsumme = (double) mittelwertsumme_shared;
|
||||||
|
//mittelwertsumme /= 1000000.0;
|
||||||
|
|
||||||
|
//Offset = (double) Offset_shared;
|
||||||
|
//Offset /= 1000000.0;
|
||||||
|
|
||||||
|
//String zw[] = Array_shared.split(";", listen_groesse);
|
||||||
|
|
||||||
|
//if(shared_merk == 2){
|
||||||
|
//for (int i=0; i<listen_groesse; i++){
|
||||||
|
//float wert = Float.valueOf(zw[i]);
|
||||||
|
//Gesamt_be.add(i, wert);
|
||||||
|
//}}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause () {
|
||||||
|
super.onPause();
|
||||||
|
if (sens != null) {
|
||||||
|
bsmanager.unregisterListener(this, sens);
|
||||||
|
}
|
||||||
|
//shared_merk = 2;
|
||||||
|
// Offset_shared = (int) (Offset * 1000000.0);
|
||||||
|
//mittelwertsumme_shared = (int) (mittelwertsumme * 1000000.0);
|
||||||
|
|
||||||
|
//StringBuilder ar = new StringBuilder();
|
||||||
|
//for (int z=0; z < listen_groesse; z++){
|
||||||
|
//ar.append(Gesamt_be.get(z)).append(";");
|
||||||
|
//}
|
||||||
|
//Array_shared = ar.toString();
|
||||||
|
|
||||||
|
//SharedPreferences p = getPreferences(Context.MODE_PRIVATE);
|
||||||
|
//SharedPreferences.Editor editor = p.edit();
|
||||||
|
//editor.putInt(KEY_Mittelwertsumme, mittelwertsumme_shared);
|
||||||
|
//editor.putInt(KEY_kalibirieren, kalibrieren);
|
||||||
|
//editor.putInt(KEY_Offset, Offset_shared);
|
||||||
|
//editor.putString(KEY_Gesamt_be, Array_shared);
|
||||||
|
//editor.commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,55 +2,40 @@ package com.example.greenwatch;
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import java.net.SocketException;
|
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
WifiCommunication communication; //Member WifiCommunication
|
|
||||||
TextView tvReceivedData; //Test Textview um empfangene Daten anzuzeigen -> Gegen finale Textview in der Anzeige austauschen
|
|
||||||
//ToDo: Falls finale Textview zum Anzeigen der Nachricht anders heißt, muss das in der Klasse WifiCommunication.java angepasst werden!
|
|
||||||
// Wo anpassen: Receive Thread, Zeile 58
|
|
||||||
private EditText etSendMessage; //Test Edittext um eine Nachricht zu senden -> gegen Nachricht von den Sensoren austauschen
|
|
||||||
private Button btnSend; //Test Sendebutton
|
|
||||||
|
|
||||||
private String sendmsg = "default";
|
private Button Beschleunigungssensor;
|
||||||
|
|
||||||
@SuppressLint("MissingInflatedId")
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
xmlToJava(); //Funktionsaufruf, wo die Testbuttons etc angelegt sind
|
final Button Beschleunigungssensor = (Button) findViewById(R.id.beschleunigungssensor);
|
||||||
}
|
Beschleunigungssensor.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
public void xmlToJava(){
|
public void onClick(View v) {
|
||||||
tvReceivedData = findViewById(R.id.tvRecTxt); //Test Textview
|
Intent intent = new Intent(MainActivity.this, Beschleunigungssensor.class);
|
||||||
etSendMessage = findViewById(R.id.sendMessage); //Test Nachricht
|
startActivity(intent);
|
||||||
btnSend = findViewById(R.id.btnSend); //Test Sendebefehl
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
public void onClickSend(View view) throws SocketException{ //ToDo: Sendebefehl mit boolscher Variable lösen --> wo setzen?
|
|
||||||
sendmsg = etSendMessage.getText().toString(); //ToDo: hier String von Sensoren übergeben
|
|
||||||
communication.setMessage(sendmsg, true); //übergibt zu sendenden String und setzt die entscheidende Boolsche Variable fürs Senden
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
//Erstellen des Members
|
|
||||||
communication = new WifiCommunication(MainActivity.this, MainActivity.this, 1234);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
//schließt socket
|
|
||||||
communication.stopCommunication();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.DatagramPacket;
|
|
||||||
import java.net.DatagramSocket;
|
|
||||||
import java.net.Inet4Address;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.NetworkInterface;
|
|
||||||
import java.net.SocketException;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
|
|
||||||
public class WifiCommunication {
|
|
||||||
private final MainActivity mainActivity;
|
|
||||||
private final InetAddress address;
|
|
||||||
private final int port;
|
|
||||||
private final Context context;
|
|
||||||
private boolean newMsg;
|
|
||||||
private String rxString;
|
|
||||||
private String sendMsg;
|
|
||||||
//private String sendMsg = "default";
|
|
||||||
private final DatagramSocket socket;
|
|
||||||
volatile private boolean running;
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
public WifiCommunication(MainActivity mainActivity, Context context, int port) {
|
|
||||||
this.mainActivity = mainActivity;
|
|
||||||
this.port = port;
|
|
||||||
this.context = context;
|
|
||||||
try {
|
|
||||||
socket = new DatagramSocket(this.port);
|
|
||||||
socket.setBroadcast(true);
|
|
||||||
address = InetAddress.getByName("255.255.255.255");
|
|
||||||
running = true;
|
|
||||||
new ReceiveThread().start();
|
|
||||||
new SendThread().start();
|
|
||||||
} catch (SocketException | UnknownHostException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
mainActivity.runOnUiThread(() -> Toast.makeText(context,"Communication running", Toast.LENGTH_SHORT).show());
|
|
||||||
}
|
|
||||||
private class ReceiveThread extends Thread {
|
|
||||||
private String rxString = "";
|
|
||||||
private String previousRxString = "";
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
do {
|
|
||||||
|
|
||||||
byte[] rxBuffer = new byte[1024];
|
|
||||||
DatagramPacket packet = new DatagramPacket(rxBuffer, rxBuffer.length);
|
|
||||||
socket.receive(packet);
|
|
||||||
rxString = new String(packet.getData(), 0, packet.getLength());
|
|
||||||
|
|
||||||
if(!previousRxString.equals(rxString))
|
|
||||||
mainActivity.runOnUiThread(() -> mainActivity.tvReceivedData.setText(rxString));
|
|
||||||
|
|
||||||
previousRxString = rxString;
|
|
||||||
|
|
||||||
} while (running);
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String showMessage(){
|
|
||||||
return rxString;
|
|
||||||
}
|
|
||||||
public void setMessage(String message, boolean newMsg){
|
|
||||||
this.sendMsg=message;
|
|
||||||
this.newMsg = newMsg;
|
|
||||||
}
|
|
||||||
private class SendThread extends Thread {
|
|
||||||
private int tmpCnt = 0;
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
do {
|
|
||||||
|
|
||||||
if(newMsg == true)
|
|
||||||
{
|
|
||||||
newMsg = false;
|
|
||||||
|
|
||||||
String txString = getLocalIpAddress() + " sends. #" + tmpCnt++ + sendMsg;
|
|
||||||
byte[] txBuffer = txString.getBytes();
|
|
||||||
|
|
||||||
DatagramPacket txPacket = new DatagramPacket(txBuffer, txBuffer.length, address, port);
|
|
||||||
|
|
||||||
for(int i = 0; i < 20; i++) {
|
|
||||||
socket.send(txPacket);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (running);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static String getLocalIpAddress() {
|
|
||||||
try {
|
|
||||||
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
|
|
||||||
NetworkInterface networkInterface = (NetworkInterface) ((Enumeration<?>) en).nextElement();
|
|
||||||
for (Enumeration<InetAddress> addresses = networkInterface.getInetAddresses(); addresses.hasMoreElements();) {
|
|
||||||
InetAddress inetAddress = addresses.nextElement();
|
|
||||||
if (!inetAddress.isLoopbackAddress() && inetAddress instanceof Inet4Address) {
|
|
||||||
return inetAddress.getHostAddress();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (SocketException ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
public void stopCommunication() {
|
|
||||||
running = false;
|
|
||||||
socket.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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=".Beschleunigungssensor">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/DatenBsensor"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/WarnungBsensor"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/test"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -6,31 +6,42 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/tvRecTxt"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="vertical">
|
||||||
android:text="Received Message"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/sendMessage"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<EditText
|
<TextView
|
||||||
android:id="@+id/sendMessage"
|
android:id="@+id/textView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:text="TextView"
|
||||||
android:inputType="textPersonName"
|
tools:layout_editor_absoluteX="171dp"
|
||||||
android:text="Send Message"
|
tools:layout_editor_absoluteY="186dp" />
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/btnSend"
|
android:id="@+id/textView2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Send"
|
android:text="TextView" />
|
||||||
android:onClick="onClickSend"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
<Button
|
||||||
app:layout_constraintStart_toEndOf="@id/sendMessage"/>
|
android:id="@+id/beschleunigungssensor"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Beschleunigungssensor" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/aufnahme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Aufnahme Start" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/wiedergabe"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Wiedergabe" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user