right top menu is now working
button to close app is now working button to redirect to Documentation is now working and more...
This commit is contained in:
parent
726b5399aa
commit
9399c7a0c3
66
app/src/main/java/de/jg_cody/Teraplex/AddButtonDialog.java
Normal file
66
app/src/main/java/de/jg_cody/Teraplex/AddButtonDialog.java
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
package de.jg_cody.Teraplex;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
|
||||||
|
|
||||||
|
public class AddButtonDialog extends DialogFragment {
|
||||||
|
private EditText editTextUsername;
|
||||||
|
private EditText editTextPassword;
|
||||||
|
private AddButtonDialogListener listener;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
|
||||||
|
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||||
|
View view = inflater.inflate(R.layout.addbuttondialog, null);
|
||||||
|
|
||||||
|
builder.setView(view)
|
||||||
|
.setTitle("BUTTON")
|
||||||
|
.setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setPositiveButton("ADD", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
|
String username = editTextUsername.getText().toString();
|
||||||
|
String password = editTextPassword.getText().toString();
|
||||||
|
listener.applyTexts(username, password);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
editTextUsername = view.findViewById(R.id.button_name);
|
||||||
|
editTextPassword = view.findViewById(R.id.button_command);
|
||||||
|
|
||||||
|
return builder.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Context context) {
|
||||||
|
super.onAttach(context);
|
||||||
|
|
||||||
|
try {
|
||||||
|
listener = (AddButtonDialogListener) context;
|
||||||
|
} catch (ClassCastException e) {
|
||||||
|
throw new ClassCastException(context.toString() +
|
||||||
|
"must implement ExampleDialogListener");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface AddButtonDialogListener {
|
||||||
|
void applyTexts(String username, String password);
|
||||||
|
}
|
||||||
|
}
|
@ -23,6 +23,7 @@ private AppBarConfiguration mAppBarConfiguration;
|
|||||||
public void run() {
|
public void run() {
|
||||||
//Do something after 100ms
|
//Do something after 100ms
|
||||||
Intent m = new Intent(getApplicationContext(),MainActivity.class);
|
Intent m = new Intent(getApplicationContext(),MainActivity.class);
|
||||||
|
m.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||||
startActivity(m);
|
startActivity(m);
|
||||||
}
|
}
|
||||||
}, 4000);
|
}, 4000);
|
||||||
|
@ -3,16 +3,27 @@ package de.jg_cody.Teraplex;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.TypedValue;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
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;
|
||||||
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
|
||||||
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import androidx.navigation.NavController;
|
import androidx.navigation.NavController;
|
||||||
import androidx.navigation.Navigation;
|
import androidx.navigation.Navigation;
|
||||||
import androidx.navigation.ui.AppBarConfiguration;
|
import androidx.navigation.ui.AppBarConfiguration;
|
||||||
@ -21,25 +32,35 @@ 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 de.jg_cody.Teraplex.ui.Credits.CreditsFragment;
|
||||||
|
import de.jg_cody.Teraplex.ui.Einstellungen.EinstellungenFragment;
|
||||||
import de.jg_cody.Teraplex.ui.Konsole.KonsoleFragment;
|
import de.jg_cody.Teraplex.ui.Konsole.KonsoleFragment;
|
||||||
import de.jg_cody.Teraplex.ui.home.HomeFragment;
|
import de.jg_cody.Teraplex.ui.home.HomeFragment;
|
||||||
|
|
||||||
|
import static java.security.AccessController.getContext;
|
||||||
|
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity implements AddButtonDialog.AddButtonDialogListener {
|
||||||
|
|
||||||
private AppBarConfiguration mAppBarConfiguration;
|
private AppBarConfiguration mAppBarConfiguration;
|
||||||
|
|
||||||
@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);
|
||||||
|
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
FloatingActionButton fab = findViewById(R.id.fab);
|
FloatingActionButton addfab = findViewById(R.id.addbutton_fab);
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
addfab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
openDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
FloatingActionButton mfab = findViewById(R.id.fab);
|
||||||
|
mfab.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
try {
|
try {
|
||||||
@ -54,7 +75,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
// Passing each menu ID as a set of Ids because each
|
// Passing each menu ID as a set of Ids because each
|
||||||
// menu should be considered as top level destinations.
|
// menu should be considered as top level destinations.
|
||||||
mAppBarConfiguration = new AppBarConfiguration.Builder(
|
mAppBarConfiguration = new AppBarConfiguration.Builder(
|
||||||
R.id.nav_home, R.id.nav_badezimmer, R.id.nav_kueche, R.id.nav_zeitsteuerung, R.id.nav_schlafzimmer, R.id.nav_flur, R.id.nav_credits, R.id.nav_konsole)
|
R.id.nav_home, R.id.nav_einstellungen, R.id.nav_kueche, R.id.nav_zeitsteuerung, R.id.nav_schlafzimmer, R.id.nav_flur, R.id.nav_credits, R.id.nav_konsole)
|
||||||
.setOpenableLayout(drawer)
|
.setOpenableLayout(drawer)
|
||||||
.build();
|
.build();
|
||||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
||||||
@ -68,6 +89,20 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
getMenuInflater().inflate(R.menu.main, menu);
|
getMenuInflater().inflate(R.menu.main, menu);
|
||||||
|
for (int i = 0; i < menu.size(); i++) {
|
||||||
|
MenuItem menuItem = menu.getItem(i);
|
||||||
|
SpannableString spannable = new SpannableString(
|
||||||
|
menu.getItem(i).getTitle().toString()
|
||||||
|
);
|
||||||
|
TypedValue typedValue = new TypedValue();
|
||||||
|
Resources.Theme theme = getTheme();
|
||||||
|
theme.resolveAttribute(R.attr.colorOnPrimary, typedValue, true);
|
||||||
|
int color = typedValue.data;
|
||||||
|
spannable.setSpan(new ForegroundColorSpan(color),
|
||||||
|
0, spannable.length(), 0);
|
||||||
|
menuItem.setTitle(spannable);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,4 +121,48 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
startActivity(startMain);
|
startActivity(startMain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void openDialog() {
|
||||||
|
AddButtonDialog AddButtonDialog = new AddButtonDialog();
|
||||||
|
AddButtonDialog.show(getSupportFragmentManager(), "example dialog");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void applyTexts(String username, String password) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void menurighttopeinstellungen(MenuItem i) {
|
||||||
|
Toast.makeText(this, "SETTINGS", Toast.LENGTH_LONG).show();
|
||||||
|
EinstellungenFragment pef = new EinstellungenFragment();
|
||||||
|
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||||
|
transaction.replace(R.id.nav_host_fragment, pef).setPrimaryNavigationFragment(pef);
|
||||||
|
transaction.addToBackStack(null);
|
||||||
|
transaction.commit();
|
||||||
|
getSupportActionBar().setTitle(R.string.menu_einstellungen);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void menurighttopcredits(MenuItem i) {
|
||||||
|
Toast.makeText(this, "CREDITS", Toast.LENGTH_LONG).show();
|
||||||
|
CreditsFragment pef = new CreditsFragment();
|
||||||
|
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||||
|
transaction.replace(R.id.nav_host_fragment, pef).setPrimaryNavigationFragment(pef);
|
||||||
|
transaction.addToBackStack(null);
|
||||||
|
transaction.commit();
|
||||||
|
getSupportActionBar().setTitle(R.string.menu_credits);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void menurighttopdocumentation(MenuItem i) {
|
||||||
|
Toast.makeText(this, "DOCUMENTATION", Toast.LENGTH_LONG).show();
|
||||||
|
Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.jg-cody.de/"));
|
||||||
|
startActivity(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void menurighttopschliessen(MenuItem i) {
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
finishAffinity();
|
||||||
|
} else {
|
||||||
|
finishAndRemoveTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package de.jg_cody.Teraplex.ui.badezimmer;
|
package de.jg_cody.Teraplex.ui.Einstellungen;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -14,17 +14,17 @@ import androidx.lifecycle.ViewModelProvider;
|
|||||||
|
|
||||||
import de.jg_cody.Teraplex.R;
|
import de.jg_cody.Teraplex.R;
|
||||||
|
|
||||||
public class BadezimmerFragment extends Fragment {
|
public class EinstellungenFragment extends Fragment {
|
||||||
|
|
||||||
private BadezimmerViewModel badezimmerViewModel;
|
private EinstellungenViewModel einstellungenViewModel;
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
ViewGroup container, Bundle savedInstanceState) {
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
badezimmerViewModel =
|
einstellungenViewModel =
|
||||||
new ViewModelProvider(this).get(BadezimmerViewModel.class);
|
new ViewModelProvider(this).get(EinstellungenViewModel.class);
|
||||||
View root = inflater.inflate(R.layout.fragment_badezimmer, container, false);
|
View root = inflater.inflate(R.layout.fragment_einstellungen, container, false);
|
||||||
final TextView textView = root.findViewById(R.id.text_badezimmer);
|
final TextView textView = root.findViewById(R.id.text_einstellungen);
|
||||||
badezimmerViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
|
einstellungenViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable String s) {
|
public void onChanged(@Nullable String s) {
|
||||||
textView.setText(s);
|
textView.setText(s);
|
@ -1,16 +1,16 @@
|
|||||||
package de.jg_cody.Teraplex.ui.badezimmer;
|
package de.jg_cody.Teraplex.ui.Einstellungen;
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
import androidx.lifecycle.ViewModel;
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
public class BadezimmerViewModel extends ViewModel {
|
public class EinstellungenViewModel extends ViewModel {
|
||||||
|
|
||||||
private MutableLiveData<String> mText;
|
private MutableLiveData<String> mText;
|
||||||
|
|
||||||
public BadezimmerViewModel() {
|
public EinstellungenViewModel() {
|
||||||
mText = new MutableLiveData<>();
|
mText = new MutableLiveData<>();
|
||||||
mText.setValue("BADEZIMMER");
|
mText.setValue("EINSTELLUNGEN");
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
public LiveData<String> getText() {
|
@ -7,9 +7,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.TimePicker;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
@ -10,7 +10,7 @@ public class SchlafzimmerViewModel extends ViewModel {
|
|||||||
|
|
||||||
public SchlafzimmerViewModel() {
|
public SchlafzimmerViewModel() {
|
||||||
mText = new MutableLiveData<>();
|
mText = new MutableLiveData<>();
|
||||||
mText.setValue("SCHLAFZIMMER");
|
mText.setValue("EINSTELLUNGEN");
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
public LiveData<String> getText() {
|
||||||
|
@ -49,7 +49,7 @@ public class HomeFragment extends Fragment {
|
|||||||
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);
|
final TextView login_data = root.findViewById(R.id.login_data);
|
||||||
if (user == null || ip == null) {
|
if (user == null || ip == null) {
|
||||||
login_data.setText("");
|
login_data.setText("Please connect to your automationserver!");
|
||||||
} else {
|
} else {
|
||||||
login_data.setText("Sie sind als " + user + " bei " + ip + " angemeldet!");
|
login_data.setText("Sie sind als " + user + " bei " + ip + " angemeldet!");
|
||||||
}
|
}
|
||||||
@ -60,8 +60,8 @@ public class HomeFragment extends Fragment {
|
|||||||
textView.setText(s);
|
textView.setText(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
userInput = (EditText) root.findViewById(R.id.userInput);
|
userInput = (EditText) root.findViewById(R.id.loginuserInput);
|
||||||
passwordInput = (EditText) root.findViewById(R.id.passwordInput);
|
passwordInput = (EditText) root.findViewById(R.id.loginpasswordInput);
|
||||||
ipInput = (EditText) root.findViewById(R.id.ipInput);
|
ipInput = (EditText) root.findViewById(R.id.ipInput);
|
||||||
loginButton = (Button) root.findViewById(R.id.loginButton);
|
loginButton = (Button) root.findViewById(R.id.loginButton);
|
||||||
loginButton.setOnClickListener(new View.OnClickListener() {
|
loginButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
9
app/src/main/res/drawable/add_black_24dp.xml
Normal file
9
app/src/main/res/drawable/add_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/code_black_24dp.xml
Normal file
9
app/src/main/res/drawable/code_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/contact_support_black_24dp.xml
Normal file
9
app/src/main/res/drawable/contact_support_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M11,23.59v-3.6c-5.01,-0.26 -9,-4.42 -9,-9.49C2,5.26 6.26,1 11.5,1S21,5.26 21,10.5c0,4.95 -3.44,9.93 -8.57,12.4l-1.43,0.69zM11.5,3C7.36,3 4,6.36 4,10.5S7.36,18 11.5,18L13,18v2.3c3.64,-2.3 6,-6.08 6,-9.8C19,6.36 15.64,3 11.5,3zM10.5,14.5h2v2h-2zM12.5,13h-2c0,-3.25 3,-3 3,-5 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2h-2c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,2.5 -3,2.75 -3,5z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/home_black_24dp.xml
Normal file
9
app/src/main/res/drawable/home_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M12,5.69l5,4.5V18h-2v-6H9v6H7v-7.81l5,-4.5M12,3L2,12h3v8h6v-6h2v6h6v-8h3L12,3z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/remove_black_24dp.xml
Normal file
9
app/src/main/res/drawable/remove_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M19,13H5v-2h14v2z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/schedule_black_24dp.xml
Normal file
9
app/src/main/res/drawable/schedule_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7L11,7v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
BIN
app/src/main/res/drawable/teraplex_login.jpg
Normal file
BIN
app/src/main/res/drawable/teraplex_login.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 784 KiB |
@ -26,6 +26,26 @@
|
|||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
app:srcCompat="?android:attr/fingerprintAuthDrawable" />
|
app:srcCompat="?android:attr/fingerprintAuthDrawable" />
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/addbutton_fab"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:layout_marginVertical="70dp"
|
||||||
|
android:hapticFeedbackEnabled="true"
|
||||||
|
android:src="@drawable/add_black_24dp" />
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/delbutton_fab"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:layout_marginVertical="140dp"
|
||||||
|
android:hapticFeedbackEnabled="true"
|
||||||
|
android:src="@drawable/remove_black_24dp" />
|
||||||
|
|
||||||
<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"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:background="@drawable/background"
|
android:background="@drawable/background"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerCrop"
|
||||||
app:headerLayout="@layout/nav_header_main"
|
app:headerLayout="@layout/nav_header_main"
|
||||||
app:itemIconTint="@color/white"
|
app:itemIconTint="@color/white"
|
||||||
app:itemTextColor="#FFFFFF"
|
app:itemTextColor="#FFFFFF"
|
||||||
|
22
app/src/main/res/layout/addbuttondialog.xml
Normal file
22
app/src/main/res/layout/addbuttondialog.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/button_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="NAME" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/button_command"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/button_name"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:hint="COMMAND"
|
||||||
|
android:inputType="textPassword" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -1,120 +0,0 @@
|
|||||||
<?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=".ui.badezimmer.BadezimmerFragment"
|
|
||||||
android:background="@drawable/background">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/text_badezimmer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="20sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView3"
|
|
||||||
android:layout_width="193dp"
|
|
||||||
android:layout_height="33dp"
|
|
||||||
android:layout_marginTop="200dp"
|
|
||||||
android:text="Raumtemperatur in °C"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/seekBar"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView4"
|
|
||||||
android:layout_width="193dp"
|
|
||||||
android:layout_height="33dp"
|
|
||||||
android:text="Elektrogeräte EIN/AUS"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/seekBar"
|
|
||||||
style="@android:style/Widget.DeviceDefault.Light.SeekBar"
|
|
||||||
android:layout_width="235dp"
|
|
||||||
android:layout_height="45dp"
|
|
||||||
android:max="30"
|
|
||||||
android:progress="15"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/textView4"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
android:id="@+id/switch1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="50dp"
|
|
||||||
android:layout_marginLeft="50dp"
|
|
||||||
android:text="Steckdose 1 "
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/switch3"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/switch2"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
android:id="@+id/switch3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="50dp"
|
|
||||||
android:layout_marginLeft="50dp"
|
|
||||||
android:layout_marginBottom="200dp"
|
|
||||||
android:text="Steckdose 3 "
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/switch4"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/switch1" />
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
android:id="@+id/switch2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="50dp"
|
|
||||||
android:layout_marginRight="50dp"
|
|
||||||
android:text="Steckdose 2 "
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/switch4"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/switch1"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
android:id="@+id/switch4"
|
|
||||||
android:layout_width="129dp"
|
|
||||||
android:layout_height="22dp"
|
|
||||||
android:layout_marginEnd="50dp"
|
|
||||||
android:layout_marginRight="50dp"
|
|
||||||
android:layout_marginBottom="200dp"
|
|
||||||
android:text="Steckdose 4 "
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/switch3"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/switch2" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -5,8 +5,20 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.Credits.CreditsFragment"
|
tools:context=".ui.Credits.CreditsFragment">
|
||||||
android:background="@drawable/background">
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/madeby"
|
android:id="@+id/madeby"
|
||||||
|
204
app/src/main/res/layout/fragment_einstellungen.xml
Normal file
204
app/src/main/res/layout/fragment_einstellungen.xml
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?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=".ui.Einstellungen.EinstellungenFragment">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_einstellungen"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:gravity="center_horizontal" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/background"
|
||||||
|
android:layout_width="193dp"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="HINTERGRUND"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/colors" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/colors"
|
||||||
|
android:layout_width="193dp"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="75dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="FARBEN"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sprache"
|
||||||
|
android:layout_width="193dp"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="SPRACHE"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/background" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/reset_settings"
|
||||||
|
android:layout_width="225dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="EINSTELLUNGEN ZURÜCKSETZEN"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/spSprachen" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/nightmode"
|
||||||
|
android:layout_width="219dp"
|
||||||
|
android:layout_height="31dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="FARBSCHEMA"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button_reset" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/spThemes"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="@color/purple_200"
|
||||||
|
android:entries="@array/theme_array"
|
||||||
|
android:spinnerMode="dialog"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/colors" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/spSprachen"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="@color/purple_200"
|
||||||
|
android:entries="@array/language_array"
|
||||||
|
android:spinnerMode="dialog"
|
||||||
|
android:textSize="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.498"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sprache" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_reset"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="RESET"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/reset_settings" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_pickimage"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="GRAFIK WÄHLEN"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.498"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/background" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_reset2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="75dp"
|
||||||
|
android:layout_marginLeft="75dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="GREEN"
|
||||||
|
app:backgroundTint="#00FF73"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/button_reset3"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button_reset4" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_reset3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginEnd="75dp"
|
||||||
|
android:layout_marginRight="75dp"
|
||||||
|
android:text="DARK"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
app:backgroundTint="#001932"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/button_reset2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button_reset6" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_reset6"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="75dp"
|
||||||
|
android:layout_marginRight="75dp"
|
||||||
|
android:text="RED"
|
||||||
|
app:backgroundTint="#FF0000"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/button_reset4"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/nightmode" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_reset4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="75dp"
|
||||||
|
android:layout_marginLeft="75dp"
|
||||||
|
android:text="BLUE"
|
||||||
|
app:backgroundTint="#00A6FF"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/button_reset6"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/nightmode" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,12 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.Schlafzimmer.SchlafzimmerFragment"
|
tools:context=".ui.Schlafzimmer.SchlafzimmerFragment">
|
||||||
android:background="@drawable/background">
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/überschrift5"
|
android:id="@+id/überschrift5"
|
||||||
|
@ -5,9 +5,21 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/background"
|
|
||||||
tools:context=".ui.home.HomeFragment">
|
tools:context=".ui.home.HomeFragment">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_home"
|
android:id="@+id/text_home"
|
||||||
android:layout_width="309dp"
|
android:layout_width="309dp"
|
||||||
@ -16,7 +28,7 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/login_data"
|
app:layout_constraintBottom_toTopOf="@+id/ipInput"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@ -29,18 +41,6 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="#00FF00"
|
android:textColor="#00FF00"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/ipInput"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="253dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="Please connect to your automationserver!"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
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/text_home" />
|
app:layout_constraintTop_toBottomOf="@+id/text_home" />
|
||||||
@ -55,13 +55,13 @@
|
|||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textColorHint="#FFFFFF"
|
android:textColorHint="#FFFFFF"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/userInput"
|
app:layout_constraintBottom_toTopOf="@+id/loginuserInput"
|
||||||
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" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/userInput"
|
android:id="@+id/loginuserInput"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:backgroundTint="#FFFFFF"
|
android:backgroundTint="#FFFFFF"
|
||||||
@ -78,7 +78,7 @@
|
|||||||
app:layout_constraintVertical_bias="0.434" />
|
app:layout_constraintVertical_bias="0.434" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/passwordInput"
|
android:id="@+id/loginpasswordInput"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:backgroundTint="#FFFFFF"
|
android:backgroundTint="#FFFFFF"
|
||||||
@ -90,7 +90,7 @@
|
|||||||
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"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/userInput" />
|
app:layout_constraintTop_toBottomOf="@+id/loginuserInput" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/loginButton"
|
android:id="@+id/loginButton"
|
||||||
@ -101,7 +101,7 @@
|
|||||||
app:icon="@drawable/login_24px"
|
app:icon="@drawable/login_24px"
|
||||||
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/passwordInput" />
|
app:layout_constraintTop_toBottomOf="@+id/loginpasswordInput" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/wlan_an"
|
android:id="@+id/wlan_an"
|
||||||
|
@ -5,8 +5,20 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.Konsole.KonsoleFragment"
|
tools:context=".ui.Konsole.KonsoleFragment">
|
||||||
android:background="@drawable/background">
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_konsole"
|
android:id="@+id/text_konsole"
|
||||||
|
@ -5,8 +5,20 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.kueche.KuecheFragment"
|
tools:context=".ui.kueche.KuecheFragment">
|
||||||
android:background="@drawable/background">
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_kueche"
|
android:id="@+id/text_kueche"
|
||||||
@ -23,7 +35,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView3"
|
android:id="@+id/background"
|
||||||
android:layout_width="193dp"
|
android:layout_width="193dp"
|
||||||
android:layout_height="33dp"
|
android:layout_height="33dp"
|
||||||
android:layout_marginTop="200dp"
|
android:layout_marginTop="200dp"
|
||||||
@ -38,7 +50,7 @@
|
|||||||
android:gravity="center_horizontal" />
|
android:gravity="center_horizontal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView4"
|
android:id="@+id/sprache"
|
||||||
android:layout_width="193dp"
|
android:layout_width="193dp"
|
||||||
android:layout_height="33dp"
|
android:layout_height="33dp"
|
||||||
android:text="Elektrogeräte EIN/AUS"
|
android:text="Elektrogeräte EIN/AUS"
|
||||||
@ -58,10 +70,10 @@
|
|||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:max="30"
|
android:max="30"
|
||||||
android:progress="15"
|
android:progress="15"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/textView4"
|
app:layout_constraintBottom_toTopOf="@+id/sprache"
|
||||||
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/background" />
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:id="@+id/switch1"
|
android:id="@+id/switch1"
|
||||||
@ -74,7 +86,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/switch3"
|
app:layout_constraintBottom_toTopOf="@+id/switch3"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/switch2"
|
app:layout_constraintEnd_toStartOf="@+id/switch2"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
app:layout_constraintTop_toBottomOf="@+id/sprache" />
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:id="@+id/switch3"
|
android:id="@+id/switch3"
|
||||||
@ -101,7 +113,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/switch4"
|
app:layout_constraintBottom_toTopOf="@+id/switch4"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/switch1"
|
app:layout_constraintStart_toEndOf="@+id/switch1"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
app:layout_constraintTop_toBottomOf="@+id/sprache" />
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:id="@+id/switch4"
|
android:id="@+id/switch4"
|
||||||
|
100
app/src/main/res/layout/fragment_login.xml
Normal file
100
app/src/main/res/layout/fragment_login.xml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<?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=".ui.home.HomeFragment">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/teraplex_login"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_home"
|
||||||
|
android:layout_width="309dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="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/loginuserInput"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/text_home" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/loginuserInput"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:backgroundTint="#FFFFFF"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/login_benutzername"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textColorHint="#FFFFFF"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.497"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.434" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/loginpasswordInput"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:backgroundTint="#FFFFFF"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/login_passwort"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textColorHint="#FFFFFF"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.497"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/loginuserInput" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/loginButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hapticFeedbackEnabled="true"
|
||||||
|
android:text="Login"
|
||||||
|
app:icon="@drawable/login_24px"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/loginpasswordInput" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView4"
|
||||||
|
android:layout_width="175dp"
|
||||||
|
android:layout_height="178dp"
|
||||||
|
android:src="?android:attr/fingerprintAuthDrawable"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/loginuserInput"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.625" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -5,8 +5,20 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.Schlafzimmer.SchlafzimmerFragment"
|
tools:context=".ui.Schlafzimmer.SchlafzimmerFragment">
|
||||||
android:background="@drawable/background">
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/schlafzimmeru3an"
|
android:id="@+id/schlafzimmeru3an"
|
||||||
@ -15,7 +27,7 @@
|
|||||||
android:hapticFeedbackEnabled="true"
|
android:hapticFeedbackEnabled="true"
|
||||||
android:text="AN"
|
android:text="AN"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/schlafzimmeru1aus"
|
app:layout_constraintStart_toEndOf="@+id/schlafzimmeru3aus"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru3" />
|
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru3" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -38,7 +50,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hapticFeedbackEnabled="true"
|
android:hapticFeedbackEnabled="true"
|
||||||
android:text="AUS"
|
android:text="AUS"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/schlafzimmeru1an"
|
app:layout_constraintEnd_toStartOf="@+id/schlafzimmeru3an"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru3" />
|
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru3" />
|
||||||
|
|
||||||
@ -49,16 +61,18 @@
|
|||||||
android:hapticFeedbackEnabled="true"
|
android:hapticFeedbackEnabled="true"
|
||||||
android:text="AN"
|
android:text="AN"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/schlafzimmeru1aus"
|
app:layout_constraintStart_toEndOf="@+id/schlafzimmeru2aus"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru2" />
|
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru2" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/schlafzimmeru2aus"
|
android:id="@+id/schlafzimmeru2aus"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
android:hapticFeedbackEnabled="true"
|
android:hapticFeedbackEnabled="true"
|
||||||
android:text="AUS"
|
android:text="AUS"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/schlafzimmeru1an"
|
app:layout_constraintEnd_toStartOf="@+id/schlafzimmeru2an"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru2" />
|
app:layout_constraintTop_toBottomOf="@+id/schlafzimmeru2" />
|
||||||
|
|
||||||
|
@ -5,9 +5,20 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.zeitsteuerung.ZeitsteuerungFragment"
|
tools:context=".ui.zeitsteuerung.ZeitsteuerungFragment">
|
||||||
android:background="@drawable/background">
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/Background"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/befehlInput2"
|
android:id="@+id/befehlInput2"
|
||||||
|
11
app/src/main/res/layout/switch_item.xml
Normal file
11
app/src/main/res/layout/switch_item.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true" />
|
||||||
|
</RelativeLayout>
|
@ -1,35 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu
|
<menu
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:showIn="navigation_view">
|
tools:showIn="navigation_view">
|
||||||
|
|
||||||
<group android:checkableBehavior="single">
|
<group android:checkableBehavior="single"
|
||||||
|
android:id="@+id/Main">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_home"
|
android:id="@+id/nav_home"
|
||||||
|
android:icon="@drawable/home_black_24dp"
|
||||||
android:title="@string/menu_home" />
|
android:title="@string/menu_home" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_konsole"
|
android:id="@+id/nav_konsole"
|
||||||
|
android:icon="@drawable/code_black_24dp"
|
||||||
android:title="@string/menu_konsole" />
|
android:title="@string/menu_konsole" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_zeitsteuerung"
|
android:id="@+id/nav_zeitsteuerung"
|
||||||
|
android:icon="@drawable/schedule_black_24dp"
|
||||||
android:title="@string/menu_zeitsteuerung" />
|
android:title="@string/menu_zeitsteuerung" />
|
||||||
<item
|
|
||||||
android:title="-----------------------------------------------------------------------------" />
|
</group>
|
||||||
<item
|
<group >
|
||||||
android:id="@+id/nav_badezimmer"
|
|
||||||
android:title="@string/menu_badezimmer" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_kueche"
|
|
||||||
android:title="@string/menu_küche" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_schlafzimmer"
|
|
||||||
android:title="@string/menu_schlafzimmer" />
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_flur"
|
android:id="@+id/nav_flur"
|
||||||
android:title="@string/menu_flur" />
|
android:title="@string/menu_flur" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_credits"
|
android:id="@+id/nav_schlafzimmer"
|
||||||
android:title="@string/menu_credits" />
|
android:title="@string/menu_schlafzimmer" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_kueche"
|
||||||
|
android:title="@string/menu_küche" />
|
||||||
</group>
|
</group>
|
||||||
</menu>
|
</menu>
|
@ -3,22 +3,33 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/sprache"
|
android:id="@+id/Frage"
|
||||||
android:icon="@drawable/ic_menu_share"
|
android:icon="@drawable/contact_support_black_24dp"
|
||||||
|
android:onClick="menurighttopdocumentation"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
android:title="@string/menu_sprache"
|
android:title="@string/menu_frage"
|
||||||
|
app:iconTint="?attr/colorOnPrimary"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/einstellungen"
|
||||||
|
android:icon="@drawable/ic_menu_share"
|
||||||
|
android:onClick="menurighttopeinstellungen"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="@string/menu_einstellungen"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/credits"
|
android:id="@+id/credits"
|
||||||
android:icon="@drawable/ic_menu_share"
|
android:onClick="menurighttopcredits"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
android:title="@string/menu_credits"
|
android:title="@string/menu_credits"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/exit"
|
android:id="@+id/exit"
|
||||||
android:icon="@drawable/logout_24px"
|
android:icon="@drawable/logout_24px"
|
||||||
|
android:onClick="menurighttopschliessen"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
android:title="@string/menu_schliessen"
|
android:title="@string/menu_schliessen"
|
||||||
|
app:iconTint="?attr/colorOnPrimary"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/logout"
|
android:id="@+id/logout"
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
tools:layout="@layout/fragment_konsole" />
|
tools:layout="@layout/fragment_konsole" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/nav_badezimmer"
|
android:id="@+id/nav_einstellungen"
|
||||||
android:name="de.jg_cody.Teraplex.ui.badezimmer.BadezimmerFragment"
|
android:name="de.jg_cody.Teraplex.ui.Einstellungen.EinstellungenFragment"
|
||||||
android:label="@string/menu_badezimmer"
|
android:label="@string/menu_einstellungen"
|
||||||
tools:layout="@layout/fragment_badezimmer" />
|
tools:layout="@layout/fragment_einstellungen" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/nav_kueche"
|
android:id="@+id/nav_kueche"
|
||||||
|
@ -12,5 +12,7 @@
|
|||||||
<!-- Status bar color. -->
|
<!-- Status bar color. -->
|
||||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
|
<item name="android:actionMenuTextColor">@color/white</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
@ -5,6 +5,14 @@
|
|||||||
<color name="purple_700">#B30000</color>
|
<color name="purple_700">#B30000</color>
|
||||||
<color name="teal_200">#DA0303</color>
|
<color name="teal_200">#DA0303</color>
|
||||||
<color name="teal_700">#870101</color>
|
<color name="teal_700">#870101</color>
|
||||||
|
|
||||||
<color name="black">#000000</color>
|
<color name="black">#000000</color>
|
||||||
<color name="white">#FFFFFF</color>
|
<color name="white">#FFFFFF</color>
|
||||||
|
|
||||||
|
<color name="green_200">#00EE00</color>
|
||||||
|
<color name="green_500">#00EE00</color>
|
||||||
|
<color name="green_700">#00B300</color>
|
||||||
|
<color name="green_100">#03DA03</color>
|
||||||
|
<color name="green_600">#018701</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
13
app/src/main/res/values/language.xml
Normal file
13
app/src/main/res/values/language.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string-array name="planets_array">
|
||||||
|
<item>Mercury</item>
|
||||||
|
<item>Venus</item>
|
||||||
|
<item>Earth</item>
|
||||||
|
<item>Mars</item>
|
||||||
|
<item>Jupiter</item>
|
||||||
|
<item>Saturn</item>
|
||||||
|
<item>Sun</item>
|
||||||
|
<item>Ganimed</item>
|
||||||
|
</string-array>
|
||||||
|
</resources>
|
@ -22,10 +22,25 @@
|
|||||||
<string name="menu_schlafzimmer">SCHLAFZIMMER</string>
|
<string name="menu_schlafzimmer">SCHLAFZIMMER</string>
|
||||||
<string name="menu_flur">FLUR</string>
|
<string name="menu_flur">FLUR</string>
|
||||||
<string name="menu_küche">KÜCHE</string>
|
<string name="menu_küche">KÜCHE</string>
|
||||||
|
|
||||||
|
<string name="menu_einstellungen">EINSTELLUNGEN</string>
|
||||||
|
<string name="menu_frage">FRAGE</string>
|
||||||
<string name="menu_credits">CREDITS</string>
|
<string name="menu_credits">CREDITS</string>
|
||||||
<string name="menu_logout">LOGOUT</string>
|
<string name="menu_logout">LOGOUT</string>
|
||||||
<string name="menu_sprache">SPRACHE</string>
|
<string name="menu_sprache">SPRACHE</string>
|
||||||
<string name="menu_schliessen">SCHLIESSEN</string>
|
<string name="menu_schliessen">SCHLIESSEN</string>
|
||||||
<string name="menu_badezimmer">BADEZIMMER</string>
|
|
||||||
|
<string-array name="theme_array">
|
||||||
|
<item>RED</item>
|
||||||
|
<item>GREEN</item>
|
||||||
|
<item>BLUE</item>
|
||||||
|
<item>Dark</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="language_array">
|
||||||
|
<item>GERMAN</item>
|
||||||
|
<item>ENGLISH</item>
|
||||||
|
<item>KLINGONISCH</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -22,4 +22,9 @@
|
|||||||
<style name="Theme.Teraplex.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
<style name="Theme.Teraplex.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||||
|
|
||||||
<style name="Theme.Teraplex.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
<style name="Theme.Teraplex.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
|
<style name="PopupMenuStyle" parent="Theme.AppCompat.Light">
|
||||||
|
<item name="android:background">@android:color/white</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user