...
This commit is contained in:
parent
9399c7a0c3
commit
4e7407a033
@ -0,0 +1,32 @@
|
||||
package de.jg_cody.Teraplex;
|
||||
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ActivityCricketers extends AppCompatActivity {
|
||||
|
||||
RecyclerView recyclerCricketers;
|
||||
ArrayList<Cricketer> cricketersList = new ArrayList<>();
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_cricketers);
|
||||
|
||||
recyclerCricketers = findViewById(R.id.recycler_cricketers);
|
||||
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this,RecyclerView.VERTICAL,false);
|
||||
recyclerCricketers.setLayoutManager(layoutManager);
|
||||
|
||||
cricketersList = (ArrayList<Cricketer>) getIntent().getExtras().getSerializable("list");
|
||||
|
||||
recyclerCricketers.setAdapter(new CricketerAdapter(cricketersList));
|
||||
|
||||
}
|
||||
}
|
@ -26,7 +26,7 @@ public class AddButtonDialog extends DialogFragment {
|
||||
View view = inflater.inflate(R.layout.addbuttondialog, null);
|
||||
|
||||
builder.setView(view)
|
||||
.setTitle("BUTTON")
|
||||
.setTitle("SINGLE BUTTON")
|
||||
.setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
|
64
app/src/main/java/de/jg_cody/Teraplex/AddButtonsDialog.java
Normal file
64
app/src/main/java/de/jg_cody/Teraplex/AddButtonsDialog.java
Normal file
@ -0,0 +1,64 @@
|
||||
package de.jg_cody.Teraplex;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
|
||||
public class AddButtonsDialog extends DialogFragment {
|
||||
private EditText editTextUsername;
|
||||
private EditText editTextPassword;
|
||||
private AddButtonsDialogListener listener;
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
|
||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
View view = inflater.inflate(R.layout.addbuttonsdialog, null);
|
||||
|
||||
builder.setView(view)
|
||||
.setTitle("ON/OFF 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 = (AddButtonsDialogListener) context;
|
||||
} catch (ClassCastException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public interface AddButtonsDialogListener {
|
||||
void applyTexts(String username, String password);
|
||||
}
|
||||
}
|
34
app/src/main/java/de/jg_cody/Teraplex/Cricketer.java
Normal file
34
app/src/main/java/de/jg_cody/Teraplex/Cricketer.java
Normal file
@ -0,0 +1,34 @@
|
||||
package de.jg_cody.Teraplex;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Cricketer implements Serializable {
|
||||
|
||||
public String cricketerName;
|
||||
public String teamName;
|
||||
|
||||
public Cricketer() {
|
||||
|
||||
}
|
||||
|
||||
public Cricketer(String cricketerName, String teamName) {
|
||||
this.cricketerName = cricketerName;
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
public String getCricketerName() {
|
||||
return cricketerName;
|
||||
}
|
||||
|
||||
public void setCricketerName(String cricketerName) {
|
||||
this.cricketerName = cricketerName;
|
||||
}
|
||||
|
||||
public String getTeamName() {
|
||||
return teamName;
|
||||
}
|
||||
|
||||
public void setTeamName(String teamName) {
|
||||
this.teamName = teamName;
|
||||
}
|
||||
}
|
57
app/src/main/java/de/jg_cody/Teraplex/CricketerAdapter.java
Normal file
57
app/src/main/java/de/jg_cody/Teraplex/CricketerAdapter.java
Normal file
@ -0,0 +1,57 @@
|
||||
package de.jg_cody.Teraplex;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CricketerAdapter extends RecyclerView.Adapter<CricketerAdapter.CricketerView> {
|
||||
|
||||
ArrayList<Cricketer> cricketersList = new ArrayList<>();
|
||||
|
||||
public CricketerAdapter(ArrayList<Cricketer> cricketersList) {
|
||||
this.cricketersList = cricketersList;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public CricketerView onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_cricketer,parent,false);
|
||||
|
||||
return new CricketerView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull CricketerView holder, int position) {
|
||||
|
||||
Cricketer cricketer = cricketersList.get(position);
|
||||
holder.textCricketerName.setText(cricketer.getCricketerName());
|
||||
holder.textTeamName.setText(cricketer.getTeamName());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return cricketersList.size();
|
||||
}
|
||||
|
||||
public class CricketerView extends RecyclerView.ViewHolder{
|
||||
|
||||
TextView textCricketerName,textTeamName;
|
||||
public CricketerView(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
||||
textCricketerName = (TextView)itemView.findViewById(R.id.text_cricketer_name);
|
||||
textTeamName = (TextView)itemView.findViewById(R.id.text_team_name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -15,7 +15,11 @@ import android.util.TypedValue;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Menu;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -23,6 +27,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatSpinner;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.Navigation;
|
||||
@ -32,6 +37,9 @@ import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.jg_cody.Teraplex.ui.Credits.CreditsFragment;
|
||||
import de.jg_cody.Teraplex.ui.Einstellungen.EinstellungenFragment;
|
||||
import de.jg_cody.Teraplex.ui.Konsole.KonsoleFragment;
|
||||
@ -55,7 +63,14 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
|
||||
addfab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openDialog();
|
||||
openDialog1();
|
||||
}
|
||||
});
|
||||
FloatingActionButton removefab = findViewById(R.id.removebutton_fab);
|
||||
removefab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openDialog2();
|
||||
}
|
||||
});
|
||||
|
||||
@ -121,7 +136,11 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
|
||||
startActivity(startMain);
|
||||
}
|
||||
|
||||
public void openDialog() {
|
||||
public void openDialog1() {
|
||||
AddButtonsDialog AddButtonsDialog = new AddButtonsDialog();
|
||||
AddButtonsDialog.show(getSupportFragmentManager(), "example dialog");
|
||||
}
|
||||
public void openDialog2() {
|
||||
AddButtonDialog AddButtonDialog = new AddButtonDialog();
|
||||
AddButtonDialog.show(getSupportFragmentManager(), "example dialog");
|
||||
}
|
||||
|
@ -4,32 +4,161 @@ import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
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.ActivityCricketers;
|
||||
import de.jg_cody.Teraplex.Cricketer;
|
||||
import de.jg_cody.Teraplex.R;
|
||||
|
||||
public class FlurFragment extends Fragment {
|
||||
|
||||
import androidx.appcompat.widget.AppCompatSpinner;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class FlurFragment extends Fragment implements View.OnClickListener {
|
||||
|
||||
private FlurViewModel flurViewModel;
|
||||
|
||||
LinearLayout layoutList;
|
||||
Button buttonAdd;
|
||||
Button buttonSubmitList;
|
||||
|
||||
List<String> teamList = new ArrayList<>();
|
||||
ArrayList<Cricketer> cricketersList = new ArrayList<>();
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
flurViewModel =
|
||||
new ViewModelProvider(this).get(FlurViewModel.class);
|
||||
View root = inflater.inflate(R.layout.fragment_flur, container, false);
|
||||
final TextView textView = root.findViewById(R.id.text_flur);
|
||||
flurViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable String s) {
|
||||
textView.setText(s);
|
||||
}
|
||||
});
|
||||
|
||||
layoutList = root.findViewById(R.id.layout_list);
|
||||
buttonAdd = root.findViewById(R.id.button_add);
|
||||
buttonSubmitList = root.findViewById(R.id.button_submit_list);
|
||||
|
||||
buttonAdd.setOnClickListener(this);
|
||||
buttonSubmitList.setOnClickListener(this);
|
||||
|
||||
|
||||
teamList.add("Team");
|
||||
teamList.add("India");
|
||||
teamList.add("Australia");
|
||||
teamList.add("England");
|
||||
|
||||
|
||||
return root;
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
switch (v.getId()){
|
||||
|
||||
case R.id.button_add:
|
||||
|
||||
addView();
|
||||
|
||||
break;
|
||||
|
||||
case R.id.button_submit_list:
|
||||
|
||||
if(checkIfValidAndRead()){
|
||||
|
||||
Intent intent = new Intent( getContext(), ActivityCricketers.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("list",cricketersList);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private boolean checkIfValidAndRead() {
|
||||
cricketersList.clear();
|
||||
boolean result = true;
|
||||
|
||||
for(int i=0;i<layoutList.getChildCount();i++){
|
||||
|
||||
View cricketerView = layoutList.getChildAt(i);
|
||||
|
||||
EditText editTextName = (EditText)cricketerView.findViewById(R.id.edit_cricketer_name);
|
||||
AppCompatSpinner spinnerTeam = (AppCompatSpinner)cricketerView.findViewById(R.id.spinner_team);
|
||||
|
||||
Cricketer cricketer = new Cricketer();
|
||||
|
||||
if(!editTextName.getText().toString().equals("")){
|
||||
cricketer.setCricketerName(editTextName.getText().toString());
|
||||
}else {
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(spinnerTeam.getSelectedItemPosition()!=0){
|
||||
cricketer.setTeamName(teamList.get(spinnerTeam.getSelectedItemPosition()));
|
||||
}else {
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
cricketersList.add(cricketer);
|
||||
|
||||
}
|
||||
|
||||
if(cricketersList.size()==0){
|
||||
result = false;
|
||||
Toast.makeText(getContext(), "Add Cricketers First!", Toast.LENGTH_SHORT).show();
|
||||
}else if(!result){
|
||||
Toast.makeText(getContext(), "Enter All Details Correctly!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void addView() {
|
||||
|
||||
final View cricketerView = getLayoutInflater().inflate(R.layout.singlebutton,null,false);
|
||||
|
||||
EditText editText = (EditText)cricketerView.findViewById(R.id.edit_cricketer_name);
|
||||
AppCompatSpinner spinnerTeam = (AppCompatSpinner)cricketerView.findViewById(R.id.spinner_team);
|
||||
ImageView imageClose = (ImageView)cricketerView.findViewById(R.id.image_remove);
|
||||
|
||||
ArrayAdapter arrayAdapter = new ArrayAdapter(getContext(),android.R.layout.simple_spinner_item,teamList);
|
||||
spinnerTeam.setAdapter(arrayAdapter);
|
||||
|
||||
imageClose.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
removeView(cricketerView);
|
||||
}
|
||||
});
|
||||
|
||||
layoutList.addView(cricketerView);
|
||||
|
||||
}
|
||||
|
||||
private void removeView(View view){
|
||||
|
||||
layoutList.removeView(view);
|
||||
|
||||
}
|
||||
|
||||
}
|
9
app/src/main/res/drawable/clear_black_24dp.xml
Normal file
9
app/src/main/res/drawable/clear_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,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12 19,6.41z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
@ -37,14 +37,15 @@
|
||||
android:src="@drawable/add_black_24dp" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/delbutton_fab"
|
||||
android:id="@+id/removebutton_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" />
|
||||
android:src="@drawable/add_black_24dp"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
10
app/src/main/res/layout/activity_cricketers.xml
Normal file
10
app/src/main/res/layout/activity_cricketers.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?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">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_cricketers"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"></androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
</RelativeLayout>
|
@ -4,6 +4,15 @@
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/button_command2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/button_command"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:hint="COMMAND"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/button_name"
|
||||
android:layout_width="match_parent"
|
||||
@ -16,7 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/button_name"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:hint="COMMAND"
|
||||
android:hint="BUTTON"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
</RelativeLayout>
|
49
app/src/main/res/layout/addbuttonsdialog.xml
Normal file
49
app/src/main/res/layout/addbuttonsdialog.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?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_command2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/button_command"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:hint="COMMAND 1"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/button_command3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/button_command2"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:hint="BUTTON 2"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/button_command4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/button_command3"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:hint="COMMAND 2"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<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="BUTTON 1 "
|
||||
android:inputType="textPassword" />
|
||||
|
||||
</RelativeLayout>
|
@ -1,252 +1,58 @@
|
||||
<?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"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.Schlafzimmer.SchlafzimmerFragment">
|
||||
android:background="@drawable/background"
|
||||
android:orientation="vertical"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<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/überschrift5"
|
||||
android:layout_width="193dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Überschrift4"
|
||||
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_toBottomOf="@+id/überschrift4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AN"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ü11"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AUS"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ü10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/überschrift4"
|
||||
android:layout_width="193dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Überschrift4"
|
||||
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_toBottomOf="@+id/überschrift3" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AUS"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ü9"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AN"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ü7"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/überschrift3"
|
||||
android:layout_width="193dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Überschrift3"
|
||||
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_toBottomOf="@+id/überschrift2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AN"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ü5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift3" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AUS"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ü6"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/überschrift1"
|
||||
android:layout_width="193dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Überschrift1"
|
||||
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_toBottomOf="@+id/divider" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AUS"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ü2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AN"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ü1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/überschrift2"
|
||||
android:layout_width="193dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Überschrift2"
|
||||
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_toBottomOf="@+id/überschrift1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AUS"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ü4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ü4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="AN"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ü3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/überschrift2" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/button_input"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="75dp"
|
||||
android:backgroundTint="#FFFFFF"
|
||||
android:ems="10"
|
||||
android:hint="NAME"
|
||||
android:inputType="text"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColorHint="#FFFFFF"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.542"
|
||||
app:layout_constraintStart_toEndOf="@+id/add_button"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/add_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="75dp"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:text="ADD BUTTON"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_flur"
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
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_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
android:layout_marginTop="75dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:text="Cricketer List"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"></TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@color/white"
|
||||
android:fadingEdge="horizontal|vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_input" />
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"></LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<Button
|
||||
android:id="@+id/button_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/ic_launcher_background"
|
||||
android:drawableRight="@drawable/add_black_24dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="Add"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"></Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_submit_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/ic_launcher_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="Submit List"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"></Button>
|
||||
|
||||
</LinearLayout>
|
35
app/src/main/res/layout/row_cricketer.xml
Normal file
35
app/src/main/res/layout/row_cricketer.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:layout_margin="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:padding="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_cricketer_name"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cricketer Name"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/black"></TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_team_name"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Team Name"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"></TextView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
39
app/src/main/res/layout/singlebutton.xml
Normal file
39
app/src/main/res/layout/singlebutton.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/button2"
|
||||
android:layout_width="299dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:insetLeft="25dp"
|
||||
android:insetRight="25dp"
|
||||
android:text="Button1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button3"
|
||||
android:layout_width="299dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:insetLeft="25dp"
|
||||
android:insetRight="25dp"
|
||||
android:text="Button2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_remove"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/clear_black_24dp"
|
||||
app:tint="@color/black"
|
||||
tools:ignore="VectorDrawableCompat">
|
||||
|
||||
</ImageView>
|
||||
|
||||
</LinearLayout>
|
46
app/src/main/res/layout/singlebutton_recover.xml
Normal file
46
app/src/main/res/layout/singlebutton_recover.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_cricketer_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/side_nav_bar"
|
||||
android:hint="Cricketer Name"
|
||||
android:paddingLeft="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"></EditText>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:drawable/arrow_down_float">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/spinner_team"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/side_nav_bar"></androidx.appcompat.widget.AppCompatSpinner>
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_remove"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/restart_alt_24px"
|
||||
app:tint="@color/black">
|
||||
|
||||
</ImageView>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user