App
App
App
com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="10dp"
android:fillViewport="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
app:layout_constraintEnd_toStartOf="@+id/oper_wt"
app:layout_constraintStart_toStartOf="@+id/oper_wt">
<EditText
android:id="@+id/editTextNumber8"
android:layout_width="153dp"
android:layout_height="52dp"
android:ems="10"
android:hint=" QNH"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="172dp"
tools:layout_editor_absoluteY="222dp" />
<EditText
android:id="@+id/editTextNumber3"
android:layout_width="179dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" FLAPS SETTINGS"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="87dp"
tools:layout_editor_absoluteY="532dp" />
<EditText
android:id="@+id/oper_wt2"
android:layout_width="180dp"
android:layout_height="49dp"
android:gravity="center"
android:hint="Weight(1000Kg)"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="89dp"
tools:layout_editor_absoluteY="334dp" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="266dp"
android:layout_height="138dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/image3" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginRight="16dp"
android:background="@drawable/button_1"
android:backgroundTint="@color/RippleEffect"
android:text="Next "
android:textColor="@color/white"
app:layout_constraintRight_toRightOf="parent"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteY="666dp" />
<EditText
android:id="@+id/editTextNumber"
android:layout_width="177dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" Elevation(ft)"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="89dp"
tools:layout_editor_absoluteY="400dp" />
<EditText
android:id="@+id/editTextNumber2"
android:layout_width="177dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" OAT(°C)"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="87dp"
tools:layout_editor_absoluteY="461dp" />
<EditText
android:id="@+id/editTextNumber4"
android:layout_width="135dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" KIAS"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="607dp" />
<EditText
android:id="@+id/editTextNumber5"
android:layout_width="132dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" FL"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="193dp"
tools:layout_editor_absoluteY="607dp" />
<TextView
android:id="@+id/textView19"
android:layout_width="288dp"
android:layout_height="52dp"
android:fontFamily="sans-serif-black"
android:text=" Please enter Landing conditions"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="37dp"
tools:layout_editor_absoluteY="157dp" />
<EditText
android:id="@+id/editTextNumber6"
android:layout_width="179dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" WIND"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck"
tools:layout_editor_absoluteX="87dp"
tools:layout_editor_absoluteY="275dp" />
<EditText
android:id="@+id/editTextNumber7"
android:layout_width="130dp"
android:layout_height="48dp"
android:ems="10"
android:hint=" RNW"
android:inputType="number"
tools:ignore="MissingConstraints,TextSizeCheck,TextSizeCheck"
tools:layout_editor_absoluteX="18dp"
tools:layout_editor_absoluteY="222dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<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:id="@+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/tv_accueil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TOLD CARD "
android:textColor="#04093A"
android:textColorLink="#FFFFFF"
android:textSize="40dp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/imageView"
app:layout_constraintVertical_bias="0.1" />
<Button
android:id="@+id/button1"
android:layout_width="230dp"
android:layout_height="50dp"
android:layout_marginTop="8dp"
android:backgroundTint="#0D47A1"
android:text="Guide d'utilisation"
android:textSize="16dp"
app:cornerRadius="30dp"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" />
<Button
android:id="@+id/button3"
android:layout_width="230dp"
android:layout_height="50dp"
android:layout_marginTop="5dp"
android:backgroundTint="#0D47A1"
android:text="Documentation"
android:textSize="16dp"
app:cornerRadius="30dp"
app:layout_constraintTop_toBottomOf="@+id/button1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" />
<Button
android:id="@+id/button2"
android:layout_width="300dp"
android:layout_height="80dp"
android:layout_marginTop="68dp"
android:backgroundTint="#0D47A1"
android:text="Calculate TOLD CARD"
android:textSize="16dp"
app:backgroundTint="#1AB69F"
app:cornerRadius="30dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_accueil" />
<ImageView
android:id="@+id/imageView"
android:layout_width="369dp"
android:layout_height="259dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2"
app:layout_constraintVertical_bias="0.168"
app:srcCompat="@drawable/avioncasa" />
</androidx.constraintlayout.widget.ConstraintLayout>
package com.example.toldcard;
import android.content.Intent;
import android.os.Bundle;
import com.example.toldcard.databinding.ActivityTakeoffconditionsBinding;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.ui.AppBarConfiguration;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Switch;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
editTextOAT = findViewById(R.id.oat);
editTextQNH = findViewById(R.id.editTextNumber11);
editTextRNW = findViewById(R.id.rnw);
editTextWIND = findViewById(R.id.wind);
editTextALT = findViewById(R.id.alt);
switchAI = findViewById(R.id.switch1);
buttonNext = findViewById(R.id.button);
buttonNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Récupérer les valeurs saisies dans les EditText
oat = Integer.parseInt(editTextOAT.getText().toString());
qnh = Integer.parseInt(editTextQNH.getText().toString());
rnw = Integer.parseInt(editTextRNW.getText().toString());
wind = Integer.parseInt(editTextWIND.getText().toString());
alt = Integer.parseInt(editTextALT.getText().toString());
aiEnabled = switchAI.isChecked();
}
});
}
binding = ActivityTakeoffconditionsBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
}
<ScrollView 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"
android:background="@color/white"
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<ImageView
android:id="@+id/imageView2"
android:layout_width="266dp"
android:layout_height="138dp"
android:src="@drawable/image3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:fontFamily="sans-serif-black"
android:text="Please enter Landing conditions"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/imageView2" />
<EditText
android:id="@+id/editTextNumber7"
android:layout_width="130dp"
android:layout_height="48dp"
android:layout_marginTop="20dp"
android:ems="10"
android:gravity="center"
android:hint="RNW"
android:inputType="number"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toStartOf="@id/editTextNumber8"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView19" />
<EditText
android:id="@+id/editTextNumber8"
android:layout_width="160dp"
android:layout_height="49dp"
android:layout_marginTop="20dp"
android:ems="10"
android:gravity="center"
android:hint="QNH"
android:inputType="number"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/editTextNumber7"
app:layout_constraintTop_toBottomOf="@id/textView19" />
<EditText
android:id="@+id/oper_wt2"
android:layout_width="180dp"
android:layout_height="49dp"
android:layout_marginTop="84dp"
android:gravity="center"
android:hint="Weight (1000Kg)"
android:inputType="number"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.483"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/editTextNumber7" />
<EditText
android:id="@+id/editTextNumber6"
android:layout_width="179dp"
android:layout_height="48dp"
android:ems="10"
android:gravity="center"
android:hint="WIND"
android:inputType="number"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.481"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/oper_wt2" />
<EditText
android:id="@+id/editTextNumber"
android:layout_width="177dp"
android:layout_height="48dp"
android:ems="10"
android:gravity="center"
android:hint="OAT"
android:inputType="number"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.49"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/editTextNumber6" />
<EditText
android:id="@+id/oat"
android:layout_width="176dp"
android:layout_height="48dp"
android:layout_marginTop="4dp"
android:ems="10"
android:gravity="center"
android:hint="QFE"
android:inputType="number"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.488"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/editTextNumber" />
<Button
android:id="@+id/calculate_btn"
android:layout_width="99dp"
android:layout_height="74dp"
android:layout_margin="16dp"
android:layout_marginEnd="48dp"
android:layout_marginRight="48dp"
android:layout_marginBottom="144dp"
android:background="#0510EA"
android:text="Calculate"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/result_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text=""
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/calculate_btn" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
package com.example.toldcard;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Switch;
import androidx.appcompat.app.AppCompatActivity;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_takeoffconditions);
editTextOAT = findViewById(R.id.oat);
editTextQNH = findViewById(R.id.editTextNumber11);
editTextRNW = findViewById(R.id.rnw);
editTextWIND = findViewById(R.id.wind);
editTextALT = findViewById(R.id.alt);
switchAI = findViewById(R.id.switch1);
buttonNext = findViewById(R.id.button);
buttonNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Récupérer les valeurs saisies dans les EditText
oat = Integer.parseInt(editTextOAT.getText().toString());
qnh = Integer.parseInt(editTextQNH.getText().toString());
rnw = Integer.parseInt(editTextRNW.getText().toString());
wind = Integer.parseInt(editTextWIND.getText().toString());
alt = Integer.parseInt(editTextALT.getText().toString());
aiEnabled = switchAI.isChecked();
import android.os.Bundle;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import com.example.toldcard.databinding.ActivityLandingBinding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityLandingBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());