Zurück-Button minimiert app

Homescreen zeigt an als was man noch angemeldet ist
Felder können bei eingabe nicht mehr leer sein
app erzeugt bei installation nicht mehr 2 Icons
This commit is contained in:
JG-Cody 2021-03-29 18:11:32 +02:00
parent 95bd9d07af
commit cb08627b0a
47 changed files with 331 additions and 261 deletions

3
.idea/.gitignore vendored
View File

@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -6,7 +6,7 @@ android {
compileSdkVersion 29 compileSdkVersion 29
defaultConfig { defaultConfig {
applicationId "de.jg_cody.Terraplex" applicationId "de.jg_cody.Teraplex"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 29 targetSdkVersion 29
versionCode 1 versionCode 1

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex; package de.jg_cody.Teraplex;
import android.content.Context; import android.content.Context;
@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
public void useAppContext() { public void useAppContext() {
// Context of the app under test. // Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("de.jg_cody.Terraplex", appContext.getPackageName()); assertEquals("de.jg_cody.Teraplex", appContext.getPackageName());
} }
} }

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.jg_cody.Terraplex"> package="de.jg_cody.Teraplex">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application <application
@ -9,11 +9,11 @@
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Terraplex"> android:theme="@style/Theme.Teraplex">
<activity <activity
android:name=".IntroActivity" android:name=".IntroActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/Theme.Terraplex.NoActionBar"> android:theme="@style/Theme.Teraplex.NoActionBar">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -23,12 +23,7 @@
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/Theme.Terraplex.NoActionBar"> android:theme="@style/Theme.Teraplex.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </activity>
</application> </application>

View File

@ -1,28 +1,12 @@
package de.jg_cody.Terraplex; package de.jg_cody.Teraplex;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration; import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.navigation.NavigationView;
import static de.jg_cody.Terraplex.ui.Konsole.KonsoleFragment.command;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.ip;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.password;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.user;
public class IntroActivity extends AppCompatActivity { public class IntroActivity extends AppCompatActivity {

View File

@ -1,13 +1,10 @@
package de.jg_cody.Terraplex; package de.jg_cody.Teraplex;
import android.media.MediaPlayer; import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.view.Menu; import android.view.Menu;
import android.widget.Button;
import android.widget.VideoView;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.navigation.NavigationView; import com.google.android.material.navigation.NavigationView;
@ -20,10 +17,8 @@ import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import static de.jg_cody.Terraplex.ui.Konsole.KonsoleFragment.command; import de.jg_cody.Teraplex.ui.Konsole.KonsoleFragment;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.ip; import de.jg_cody.Teraplex.ui.home.HomeFragment;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.password;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.user;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
@ -44,7 +39,7 @@ private AppBarConfiguration mAppBarConfiguration;
public void onClick(View view) { public void onClick(View view) {
try { try {
Log.d("I","ACTION BUTTON CLICKED"); Log.d("I","ACTION BUTTON CLICKED");
SSH_connection.executeRemoteCommand(ip, user, password, command); SSH_connection.executeRemoteCommand(HomeFragment.ip, HomeFragment.user, HomeFragment.password, KonsoleFragment.command);
} catch (Exception e) { } catch (Exception e) {
}} }}
}); });
@ -75,5 +70,11 @@ private AppBarConfiguration mAppBarConfiguration;
|| super.onSupportNavigateUp(); || super.onSupportNavigateUp();
} }
@Override
} public void onBackPressed() {
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
}
}

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex; package de.jg_cody.Teraplex;
import android.content.Context; import android.content.Context;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex; package de.jg_cody.Teraplex;
import com.jcraft.jsch.Channel; import com.jcraft.jsch.Channel;
import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.ChannelExec;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Flur; package de.jg_cody.Teraplex.ui.Flur;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,7 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class FlurFragment extends Fragment { public class FlurFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Flur; package de.jg_cody.Teraplex.ui.Flur;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -0,0 +1,113 @@
package de.jg_cody.Teraplex.ui.Konsole;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Teraplex.R;
import de.jg_cody.Teraplex.SSH_connection;
import static de.jg_cody.Teraplex.ui.home.HomeFragment.ip;
import static de.jg_cody.Teraplex.ui.home.HomeFragment.password;
import static de.jg_cody.Teraplex.ui.home.HomeFragment.user;
public class KonsoleFragment extends Fragment {
public static String command;
public static EditText befehlInput;
Button SendCommandButton;
Button shutdown_Button;
Button reboot_Button;
private KonsoleViewModel konsoleViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
konsoleViewModel =
new ViewModelProvider(this).get(KonsoleViewModel.class);
View root = inflater.inflate(R.layout.fragment_konsole, container, false);
final TextView textView = root.findViewById(R.id.text_konsole);
konsoleViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
befehlInput = (EditText) root.findViewById(R.id.befehlInput);
SendCommandButton = (Button) root.findViewById(R.id.SendCommandButton);
SendCommandButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
if (befehlInput.getText().toString().trim().length() == 0) {
Toast.makeText(getContext(), "Feld darf nicht leer sein!", Toast.LENGTH_SHORT).show();
} else {
command = befehlInput.getText().toString();
Toast.makeText(getContext(), "Kommando gesendet...", Toast.LENGTH_SHORT).show();
Toast.makeText(root.getContext(), command, Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, command);
}
} catch (Exception e) {
}
}
});
reboot_Button = (Button) root.findViewById(R.id.reboot);
reboot_Button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
Toast.makeText(getContext(), "Reboot wird ausgeführt...", Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, "reboot");
} catch (Exception e) {
}
}
});
shutdown_Button = (Button) root.findViewById(R.id.shutdown);
shutdown_Button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new AlertDialog.Builder(getContext())
.setTitle("Server herunterfahren")
.setMessage("Bist du sicher?")
// Specifying a listener allows you to take an action before dismissing the dialog.
// The dialog is automatically dismissed when a dialog button is clicked.
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
try {
Toast.makeText(getContext(), "Server wird heruntergefahren...", Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, "shutdown now");
} catch (Exception e) {
}
// Continue with delete operation
}
})
// A null listener allows the button to dismiss the dialog and take no further action.
.setNegativeButton(android.R.string.no, null)
.show();
}
});
return root;
}
}

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Konsole; package de.jg_cody.Teraplex.ui.Konsole;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Schlafzimmer; package de.jg_cody.Teraplex.ui.Schlafzimmer;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,7 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class SchlafzimmerFragment extends Fragment { public class SchlafzimmerFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Schlafzimmer; package de.jg_cody.Teraplex.ui.Schlafzimmer;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Toilette; package de.jg_cody.Teraplex.ui.Toilette;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,7 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class ToiletteFragment extends Fragment { public class ToiletteFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.Toilette; package de.jg_cody.Teraplex.ui.Toilette;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.badezimmer; package de.jg_cody.Teraplex.ui.badezimmer;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,7 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class BadezimmerFragment extends Fragment { public class BadezimmerFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.badezimmer; package de.jg_cody.Teraplex.ui.badezimmer;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,5 +1,7 @@
package de.jg_cody.Terraplex.ui.home; package de.jg_cody.Teraplex.ui.home;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -15,8 +17,8 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
import de.jg_cody.Terraplex.SSH_connection; import de.jg_cody.Teraplex.SSH_connection;
public class HomeFragment extends Fragment { public class HomeFragment extends Fragment {
@ -34,10 +36,22 @@ public class HomeFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater, public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) { ViewGroup container, Bundle savedInstanceState) {
SharedPreferences prefs = getContext().getSharedPreferences("logindata", Context.MODE_PRIVATE);
user = prefs.getString("user", null);
password = prefs.getString("password", null);
ip = prefs.getString("ip", null);
homeViewModel = homeViewModel =
new ViewModelProvider(this).get(HomeViewModel.class); new ViewModelProvider(this).get(HomeViewModel.class);
View root = inflater.inflate(R.layout.fragment_home, container, false); View root = inflater.inflate(R.layout.fragment_home, container, false);
final TextView textView = root.findViewById(R.id.text_home); final TextView textView = root.findViewById(R.id.text_home);
final TextView login_data = root.findViewById(R.id.login_data);
if (user == null || ip == null) {
login_data.setText("");
} else {
login_data.setText("Sie sind als " + user + " bei " + ip + " angemeldet!");
}
homeViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() { homeViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override @Override
public void onChanged(@Nullable String s) { public void onChanged(@Nullable String s) {
@ -51,9 +65,21 @@ public class HomeFragment extends Fragment {
loginButton.setOnClickListener(new View.OnClickListener() { loginButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
user = userInput.getText().toString(); if (userInput.getText().toString().trim().length() == 0 || ipInput.getText().toString().trim().length() == 0 || passwordInput.getText().toString().trim().length() == 0) {
password = passwordInput.getText().toString(); Toast.makeText(getContext(), "Felder dürfen nicht leer sein!", Toast.LENGTH_SHORT).show();
ip = ipInput.getText().toString(); } else {
user = userInput.getText().toString();
password = passwordInput.getText().toString();
ip = ipInput.getText().toString();
SharedPreferences p = getContext().getSharedPreferences("logindata", Context.MODE_PRIVATE);
p.edit().putString("user", user).putString("password", password).putString("ip", ip).apply();
Toast.makeText(getContext(), "Login-Daten gespeichert...", Toast.LENGTH_SHORT).show();
if (user == null || ip == null) {
login_data.setText("");
} else {
login_data.setText("Sie sind als " + user + " bei " + ip + " angemeldet!");
}
}
} }
}); });
wlan_aus_Button = (Button) root.findViewById(R.id.wlan_aus); wlan_aus_Button = (Button) root.findViewById(R.id.wlan_aus);
@ -62,6 +88,7 @@ public class HomeFragment extends Fragment {
public void onClick(View v) { public void onClick(View v) {
try { try {
Toast.makeText(getContext(), "WLAN wird ausgeschaltet...", Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, "service hostapd stop"); SSH_connection.executeRemoteCommand(ip, user, password, "service hostapd stop");
} catch (Exception e) { } catch (Exception e) {
} }
@ -73,6 +100,7 @@ public class HomeFragment extends Fragment {
public void onClick(View v) { public void onClick(View v) {
try { try {
Toast.makeText(getContext(), "WLAN wird eingeschaltet...", Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, "service hostapd start"); SSH_connection.executeRemoteCommand(ip, user, password, "service hostapd start");
} catch (Exception e) { } catch (Exception e) {
} }

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.home; package de.jg_cody.Teraplex.ui.home;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;
@ -13,6 +13,7 @@ public class HomeViewModel extends ViewModel {
mText.setValue("Welcome to your HOMEAUTOMATION-APP"); mText.setValue("Welcome to your HOMEAUTOMATION-APP");
} }
public LiveData<String> getText() { public LiveData<String> getText() {
return mText; return mText;
} }

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.intro; package de.jg_cody.Teraplex.ui.intro;
import android.media.MediaPlayer; import android.media.MediaPlayer;
import android.net.Uri; import android.net.Uri;
@ -6,16 +6,13 @@ import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.VideoView; import android.widget.VideoView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class IntroFragment extends Fragment { public class IntroFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.intro; package de.jg_cody.Teraplex.ui.intro;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.kueche; package de.jg_cody.Teraplex.ui.kueche;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,7 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class KuecheFragment extends Fragment { public class KuecheFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.kueche; package de.jg_cody.Teraplex.ui.kueche;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.wohnzimmer; package de.jg_cody.Teraplex.ui.wohnzimmer;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,7 +12,7 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R; import de.jg_cody.Teraplex.R;
public class WohnzimmerFragment extends Fragment { public class WohnzimmerFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex.ui.wohnzimmer; package de.jg_cody.Teraplex.ui.wohnzimmer;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;

View File

@ -1,61 +0,0 @@
package de.jg_cody.Terraplex.ui.Konsole;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import de.jg_cody.Terraplex.R;
import de.jg_cody.Terraplex.SSH_connection;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.ip;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.password;
import static de.jg_cody.Terraplex.ui.home.HomeFragment.user;
public class KonsoleFragment extends Fragment {
public static String command;
public static EditText befehlInput;
Button SendCommandButton;
private KonsoleViewModel konsoleViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
konsoleViewModel =
new ViewModelProvider(this).get(KonsoleViewModel.class);
View root = inflater.inflate(R.layout.fragment_konsole, container, false);
final TextView textView = root.findViewById(R.id.text_konsole);
konsoleViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
befehlInput = (EditText) root.findViewById(R.id.befehlInput);
SendCommandButton = (Button) root.findViewById(R.id.SendCommandButton);
SendCommandButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
command = befehlInput.getText().toString();
Toast.makeText(root.getContext(),command,Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, command);
} catch (Exception e) {
}}
});
return root;
}
}

View File

@ -10,7 +10,7 @@
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment2" android:id="@+id/fragment2"
android:name="de.jg_cody.Terraplex.ui.intro.IntroFragment" android:name="de.jg_cody.Teraplex.ui.intro.IntroFragment"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</androidx.drawerlayout.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -8,22 +8,23 @@
tools:context=".MainActivity"> tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/Theme.Terraplex.AppBarOverlay"> android:theme="@style/Theme.Teraplex.AppBarOverlay">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
app:popupTheme="@style/Theme.Terraplex.PopupOverlay" /> app:popupTheme="@style/Theme.Teraplex.PopupOverlay" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_main" /> <include layout="@layout/content_main" />
<de.jg_cody.Terraplex.MovableFloatingActionButton <de.jg_cody.Teraplex.MovableFloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -12,13 +12,13 @@
android:id="@+id/text_flur" android:id="@+id/text_flur"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center_horizontal"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toStartOf="parent"
android:gravity="center_horizontal" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -21,6 +21,18 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/login_data"
android:layout_width="204dp"
android:layout_height="46dp"
android:gravity="center_horizontal"
android:textAlignment="center"
android:textColor="#00FF00"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/ipInput"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView <TextView
android:id="@+id/textView2" android:id="@+id/textView2"
android:layout_width="253dp" android:layout_width="253dp"
@ -92,34 +104,35 @@
android:id="@+id/wlan_an" android:id="@+id/wlan_an"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="100dp" android:layout_marginStart="118dp"
android:layout_marginLeft="118dp"
android:text="AN" android:text="AN"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.269"
app:layout_constraintStart_toEndOf="@+id/wlan_aus" app:layout_constraintStart_toEndOf="@+id/wlan_aus"
app:layout_constraintTop_toBottomOf="@+id/passwordInput" /> app:layout_constraintTop_toBottomOf="@+id/textView5" />
<Button <Button
android:id="@+id/wlan_aus" android:id="@+id/wlan_aus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:text="AUS" android:text="AUS"
app:layout_constraintEnd_toStartOf="@+id/wlan_an" app:layout_constraintEnd_toStartOf="@+id/wlan_an"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/passwordInput" /> app:layout_constraintTop_toBottomOf="@+id/textView5" />
<TextView <TextView
android:id="@+id/textView5" android:id="@+id/textView5"
android:layout_width="376dp" android:layout_width="376dp"
android:layout_height="28dp" android:layout_height="28dp"
android:layout_marginBottom="100dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="WLAN" android:text="WLAN"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="24sp" android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/wlan_aus" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.542"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/loginButton" /> app:layout_constraintTop_toBottomOf="@+id/loginButton" />

View File

@ -8,6 +8,38 @@
tools:context=".ui.Konsole.KonsoleFragment" tools:context=".ui.Konsole.KonsoleFragment"
android:background="@drawable/background"> android:background="@drawable/background">
<TextView
android:id="@+id/text_konsole"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center_horizontal"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/shutdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SHUTDOWN"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/reboot"
app:layout_constraintTop_toBottomOf="@+id/Serverbefehle" />
<Button
android:id="@+id/reboot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="REBOOT"
app:layout_constraintEnd_toStartOf="@+id/shutdown"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/Serverbefehle" />
<EditText <EditText
android:id="@+id/befehlInput" android:id="@+id/befehlInput"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -17,7 +49,7 @@
android:inputType="text" android:inputType="text"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF" android:textColorHint="#FFFFFF"
app:layout_constraintBottom_toBottomOf="@+id/text_konsole" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497" app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -37,17 +69,18 @@
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
<TextView <TextView
android:id="@+id/text_konsole" android:id="@+id/Serverbefehle"
android:layout_width="match_parent" android:layout_width="253dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:gravity="center_horizontal"
android:text="SERVERBEFEHLE"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:gravity="center_horizontal" /> app:layout_constraintTop_toBottomOf="@+id/SendCommandButton" />
<Button <Button
android:id="@+id/SendCommandButton" android:id="@+id/SendCommandButton"
@ -58,4 +91,14 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/befehlInput" /> app:layout_constraintTop_toBottomOf="@+id/befehlInput" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@drawable/teraplex_sidebar"
app:layout_constraintBottom_toTopOf="@+id/textView6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -14,13 +14,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:gravity="center_horizontal"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
android:gravity="center_horizontal" />
<TextView <TextView
android:id="@+id/textView3" android:id="@+id/textView3"

View File

@ -12,14 +12,15 @@
android:id="@+id/text_schlafzimmer" android:id="@+id/text_schlafzimmer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center_horizontal"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toStartOf="parent"
android:gravity="center_horizontal" />
<TextView <TextView
android:id="@+id/textView3" android:id="@+id/textView3"

View File

@ -12,14 +12,15 @@
android:id="@+id/text_toilette" android:id="@+id/text_toilette"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center_horizontal"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toStartOf="parent"
android:gravity="center_horizontal" />
<TextView <TextView
android:id="@+id/textView3" android:id="@+id/textView3"
@ -51,17 +52,29 @@
android:gravity="center_horizontal" /> android:gravity="center_horizontal" />
<SeekBar <SeekBar
android:id="@+id/seekBar" android:id="@+id/seekBar1"
style="@android:style/Widget.DeviceDefault.Light.SeekBar" android:layout_width="300dp"
android:layout_width="235dp" android:layout_height="wrap_content"
android:layout_height="45dp" android:indeterminate="false"
android:max="30" android:max="100"
android:progress="15" android:progress="0"
app:layout_constraintBottom_toTopOf="@+id/textView4"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3" /> app:layout_constraintTop_toBottomOf="@+id/textView3" />
<TextView
android:id="@+id/textview1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/seekBar1"
android:layout_alignLeft="@+id/seekBar1"
android:textSize="20dp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/textView4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seekBar1" />
<Switch <Switch
android:id="@+id/switch1" android:id="@+id/switch1"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -8,17 +8,29 @@
tools:context=".ui.wohnzimmer.WohnzimmerFragment" tools:context=".ui.wohnzimmer.WohnzimmerFragment"
android:background="@drawable/background"> android:background="@drawable/background">
<TextView <TextView
android:id="@+id/text_wohnzimmer" android:id="@+id/text_wohnzimmer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center_horizontal"
android:textAlignment="center" android:textAlignment="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" />
<TimePicker
android:id="@+id/timePicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:timePickerMode="clock"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:gravity="center_horizontal" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -8,49 +8,49 @@
<fragment <fragment
android:id="@+id/nav_home" android:id="@+id/nav_home"
android:name="de.jg_cody.Terraplex.ui.home.HomeFragment" android:name="de.jg_cody.Teraplex.ui.home.HomeFragment"
android:label="Home" android:label="Home"
tools:layout="@layout/fragment_home" /> tools:layout="@layout/fragment_home" />
<fragment <fragment
android:id="@+id/nav_konsole" android:id="@+id/nav_konsole"
android:name="de.jg_cody.Terraplex.ui.Konsole.KonsoleFragment" android:name="de.jg_cody.Teraplex.ui.Konsole.KonsoleFragment"
android:label="Konsole" android:label="Konsole"
tools:layout="@layout/fragment_konsole" /> tools:layout="@layout/fragment_konsole" />
<fragment <fragment
android:id="@+id/nav_badezimmer" android:id="@+id/nav_badezimmer"
android:name="de.jg_cody.Terraplex.ui.badezimmer.BadezimmerFragment" android:name="de.jg_cody.Teraplex.ui.badezimmer.BadezimmerFragment"
android:label="Badezimmer" android:label="Badezimmer"
tools:layout="@layout/fragment_badezimmer" /> tools:layout="@layout/fragment_badezimmer" />
<fragment <fragment
android:id="@+id/nav_kueche" android:id="@+id/nav_kueche"
android:name="de.jg_cody.Terraplex.ui.kueche.KuecheFragment" android:name="de.jg_cody.Teraplex.ui.kueche.KuecheFragment"
android:label="Küche" android:label="Küche"
tools:layout="@layout/fragment_kueche" /> tools:layout="@layout/fragment_kueche" />
<fragment <fragment
android:id="@+id/nav_wohnzimmer" android:id="@+id/nav_wohnzimmer"
android:name="de.jg_cody.Terraplex.ui.wohnzimmer.WohnzimmerFragment" android:name="de.jg_cody.Teraplex.ui.wohnzimmer.WohnzimmerFragment"
android:label="Wohnzimmer" android:label="Wohnzimmer"
tools:layout="@layout/fragment_wohnzimmer" /> tools:layout="@layout/fragment_wohnzimmer" />
<fragment <fragment
android:id="@+id/nav_schlafzimmer" android:id="@+id/nav_schlafzimmer"
android:name="de.jg_cody.Terraplex.ui.Schlafzimmer.SchlafzimmerFragment" android:name="de.jg_cody.Teraplex.ui.Schlafzimmer.SchlafzimmerFragment"
android:label="Schlafzimmer" android:label="Schlafzimmer"
tools:layout="@layout/fragment_schlafzimmer" /> tools:layout="@layout/fragment_schlafzimmer" />
<fragment <fragment
android:id="@+id/nav_flur" android:id="@+id/nav_flur"
android:name="de.jg_cody.Terraplex.ui.Flur.FlurFragment" android:name="de.jg_cody.Teraplex.ui.Flur.FlurFragment"
android:label="Flur" android:label="Flur"
tools:layout="@layout/fragment_flur" /> tools:layout="@layout/fragment_flur" />
<fragment <fragment
android:id="@+id/nav_toilette" android:id="@+id/nav_toilette"
android:name="de.jg_cody.Terraplex.ui.Toilette.ToiletteFragment" android:name="de.jg_cody.Teraplex.ui.Toilette.ToiletteFragment"
android:label="Toilette" android:label="Toilette"
tools:layout="@layout/fragment_toilette" /> tools:layout="@layout/fragment_toilette" />
</navigation> </navigation>

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.Terraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.Teraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item> <item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/purple_700</item>

View File

@ -1,5 +1,5 @@
<resources> <resources>
<string name="app_name">Terraplex</string> <string name="app_name">Teraplex</string>
<string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string>
<string name="nav_header_title">Android Studio</string> <string name="nav_header_title">Android Studio</string>

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.Terraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.Teraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item> <item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/purple_700</item>
@ -14,12 +14,12 @@
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
</style> </style>
<style name="Theme.Terraplex.NoActionBar"> <style name="Theme.Teraplex.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
</style> </style>
<style name="Theme.Terraplex.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="Theme.Teraplex.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.Terraplex.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> <style name="Theme.Teraplex.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources> </resources>

View File

@ -1,4 +1,4 @@
package de.jg_cody.Terraplex; package de.jg_cody.Teraplex;
import org.junit.Test; import org.junit.Test;

View File

@ -1,2 +1,2 @@
include ':app' include ':app'
rootProject.name = "Terraplex" rootProject.name = "Teraplex"