Commit 1f667cf5 authored by Amin's avatar Amin

fix naming

parent ffac96f5
qms
\ No newline at end of file
......@@ -13,10 +13,6 @@ import androidx.core.view.WindowInsetsCompat;
public class AccessItem extends AppCompatActivity {
private LinearLayout transactionDetail;
private ImageButton back_button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -27,15 +23,15 @@ public class AccessItem extends AppCompatActivity {
return insets;
});
transactionDetail = findViewById(R.id.transactionDetails);
back_button = findViewById(R.id.backButton);
LinearLayout transactionDetail = findViewById(R.id.transactionDetails);
ImageButton backButton = findViewById(R.id.backButton);
transactionDetail.setOnClickListener(v -> {
Intent intent = new Intent(AccessItem.this, TransactionDetails.class);
startActivity(intent);
});
back_button.setOnClickListener(v -> {
backButton.setOnClickListener(v -> {
onBackPressed();
});
}
......
package com.example.qms;
import android.os.Bundle;
import android.widget.ImageButton;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
......@@ -17,8 +18,14 @@ public class AddIssue extends AppCompatActivity {
setContentView(R.layout.activity_add_issue);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
v.setPadding(0,0,0, systemBars.bottom);
return insets;
});
ImageButton backButton = findViewById(R.id.backButton);
backButton.setOnClickListener(v -> {
onBackPressed();
});
}
}
\ No newline at end of file
......@@ -28,13 +28,13 @@ public class FilterIssueList extends AppCompatActivity {
return insets;
});
LinearLayout dateSelectorTo = findViewById(R.id.date_selector_to);
TextView tvDateTo = findViewById(R.id.tv_date_to);
LinearLayout dateSelectorTo = findViewById(R.id.dateSelectorTo);
TextView tvDateTo = findViewById(R.id.tvDateTo);
LinearLayout dateSelectorFrom = findViewById(R.id.date_selector_from);
LinearLayout dateSelectorFrom = findViewById(R.id.dateSelectorFrom);
TextView tvDateFrom = findViewById(R.id.tv_date_from);
ImageButton backButon = findViewById(R.id.back_button);
ImageButton backButon = findViewById(R.id.backButton);
backButon.setOnClickListener(v -> {
onBackPressed();
......
......@@ -23,7 +23,7 @@ public class History extends AppCompatActivity {
return insets;
});
ImageButton addInfo = findViewById(R.id.add_info_icon);
ImageButton addInfo = findViewById(R.id.addInfoIcon);
ImageButton backButton = findViewById(R.id.backButton);
backButton.setOnClickListener(v -> {
......
......@@ -24,8 +24,8 @@ public class IssueDetails extends AppCompatActivity {
});
ImageButton backButton = findViewById(R.id.backButton);
ImageButton historyButton = findViewById(R.id.history_button);
FrameLayout imageFullscreen = findViewById(R.id.image_fullscreen);
ImageButton historyButton = findViewById(R.id.historyButton);
FrameLayout imageFullscreen = findViewById(R.id.imageFullscreen);
imageFullscreen.setOnClickListener(v -> {
Intent intent = new Intent(IssueDetails.this, UnitLayoutFullscreen.class);
......
......@@ -13,7 +13,7 @@ import androidx.core.view.WindowInsetsCompat;
public class Issues extends AppCompatActivity {
private ImageButton withdrawIssueIcon, back_button, filter_issue, ownerAcceptanceFormIcon;
private ImageButton withdrawIssueIcon, backButton, filterIssue, ownerAcceptanceFormIcon;
private LinearLayout issueClick;
......@@ -29,12 +29,12 @@ public class Issues extends AppCompatActivity {
return insets;
});
withdrawIssueIcon = findViewById(R.id.withdraw_issue_icon);
back_button = findViewById(R.id.backButton);
filter_issue = findViewById(R.id.filterIssue);
ownerAcceptanceFormIcon = findViewById(R.id.owner_acceptance_form_icon);
ImageButton withdrawIssueIcon = findViewById(R.id.withdraw_issue_icon);
ImageButton back_button = findViewById(R.id.backButton);
ImageButton filterIssue = findViewById(R.id.filterIssue);
ImageButton ownerAcceptanceFormIcon = findViewById(R.id.owner_acceptance_form_icon);
issueClick = findViewById(R.id.issues_click);
LinearLayout issueClick = findViewById(R.id.issueClick);
withdrawIssueIcon.setOnClickListener(v -> {
......@@ -42,7 +42,7 @@ public class Issues extends AppCompatActivity {
startActivity(intent);
});
filter_issue.setOnClickListener(v -> {
filterIssue.setOnClickListener(v -> {
Intent intent = new Intent(Issues.this, FilterIssueList.class);
startActivity(intent);
});
......
......@@ -12,12 +12,7 @@ import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.drawerlayout.widget.DrawerLayout;
public class MainActivity extends AppCompatActivity {
private DrawerLayout drawerLayout;
private LinearLayout syncNav, accessItemBottomNav, addIssueBottomNav;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -34,10 +29,10 @@ public class MainActivity extends AppCompatActivity {
});
// Initialize DrawerLayout
drawerLayout = findViewById(R.id.drawerLayout);
syncNav = findViewById(R.id.sync_nav);
accessItemBottomNav = findViewById(R.id.access_item_bottom_nav);
addIssueBottomNav = findViewById(R.id.add_issue_bottom_nav);
DrawerLayout drawerLayout = findViewById(R.id.drawerLayout);
LinearLayout syncNav = findViewById(R.id.sync_nav);
LinearLayout accessItemBottomNav = findViewById(R.id.access_item_bottom_nav);
LinearLayout addIssueBottomNav = findViewById(R.id.add_issue_bottom_nav);
......
......@@ -21,7 +21,7 @@ public class OwnerAcceptanceForm extends AppCompatActivity {
return insets;
});
ImageButton backButton = findViewById(R.id.back_button);
ImageButton backButton = findViewById(R.id.backButton);
backButton.setOnClickListener(v -> {
......
......@@ -17,10 +17,6 @@ import androidx.core.view.WindowInsetsCompat;
public class SyncActivity extends AppCompatActivity {
private Button syncButton;
private ImageButton back_button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -31,8 +27,8 @@ public class SyncActivity extends AppCompatActivity {
return insets;
});
syncButton = findViewById(R.id.sync_button);
back_button = findViewById(R.id.backButton);
Button syncButton = findViewById(R.id.sync_button);
ImageButton backButton = findViewById(R.id.backButton);
syncButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -41,7 +37,7 @@ public class SyncActivity extends AppCompatActivity {
}
});
back_button.setOnClickListener(v -> {
backButton.setOnClickListener(v -> {
onBackPressed();
});
......
......@@ -11,7 +11,6 @@ import androidx.core.view.WindowInsetsCompat;
public class TransactionDetails extends AppCompatActivity {
private ImageButton back_button;
@Override
......@@ -24,9 +23,9 @@ public class TransactionDetails extends AppCompatActivity {
return insets;
});
back_button = findViewById(R.id.backButton);
ImageButton backButton = findViewById(R.id.backButton);
back_button.setOnClickListener(v -> {
backButton.setOnClickListener(v -> {
onBackPressed();
});
......
......@@ -21,7 +21,7 @@ public class UnitLayoutFullscreen extends AppCompatActivity {
return insets;
});
ImageButton cancelButton = findViewById(R.id.cancel_button);
ImageButton cancelButton = findViewById(R.id.cancelButton);
cancelButton.setOnClickListener(v -> {
onBackPressed();
......
......@@ -13,9 +13,6 @@ import androidx.core.view.WindowInsetsCompat;
public class WithdrawIssue extends AppCompatActivity {
private Button proceedButton;
private ImageButton back_button;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -27,15 +24,15 @@ public class WithdrawIssue extends AppCompatActivity {
return insets;
});
proceedButton = findViewById(R.id.proceed_button);
back_button = findViewById(R.id.backButton);
Button proceedButton = findViewById(R.id.proceed_button);
ImageButton backButton = findViewById(R.id.backButton);
proceedButton.setOnClickListener(v -> {
Intent intent = new Intent(WithdrawIssue.this, WithdrawIssueSummary.class);
startActivity(intent);
});
back_button.setOnClickListener(v -> {
backButton.setOnClickListener(v -> {
onBackPressed();
});
......
......@@ -27,10 +27,10 @@ public class WithdrawIssueSummary extends AppCompatActivity {
return insets;
});
ImageButton backButton = findViewById(R.id.back_button);
Button confirmButton = findViewById(R.id.confirm_button);
Button backButtonBot = findViewById(R.id.back_button_bot);
EditText inputRemarks = findViewById(R.id.input_remarks);
ImageButton backButton = findViewById(R.id.backButton);
Button confirmButton = findViewById(R.id.confirmButton);
Button backButtonBot = findViewById(R.id.backButtonBot);
EditText inputRemarks = findViewById(R.id.inputRemarks);
backButton.setOnClickListener(v -> {
onBackPressed();
......
......@@ -63,6 +63,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/top_nav"
......@@ -78,15 +79,17 @@
android:textSize="27sp"
android:padding="20dp"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/faciity_layout_big"
android:scaleType="centerCrop"
android:layout_marginTop="40dp"/>
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/faciity_layout_big"
android:scaleType="centerCrop"
android:layout_marginTop="40dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -25,7 +25,7 @@
android:layout_height="59dp">
<ImageButton
android:id="@+id/back_button"
android:id="@+id/backButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
......@@ -93,7 +93,7 @@
android:textAlignment="center"/>
<LinearLayout
android:id="@+id/date_selector_from"
android:id="@+id/dateSelectorFrom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
......@@ -141,7 +141,7 @@
android:textAlignment="center"/>
<LinearLayout
android:id="@+id/date_selector_to"
android:id="@+id/dateSelectorTo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
......@@ -152,7 +152,7 @@
android:layout_marginTop="10dp">
<TextView
android:id="@+id/tv_date_to"
android:id="@+id/tvDateTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......
......@@ -50,7 +50,7 @@
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/add_info_icon"
android:id="@+id/addInfoIcon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="16dp"
......
......@@ -49,7 +49,7 @@
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/history_button"
android:id="@+id/historyButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="16dp"
......@@ -124,7 +124,7 @@
</LinearLayout>
<FrameLayout
android:id="@+id/image_fullscreen"
android:id="@+id/imageFullscreen"
android:layout_width="85dp"
android:layout_height="85dp"
android:background="@drawable/background_border">
......@@ -133,8 +133,7 @@
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/facility_plan"
android:layout_gravity="center"
android:background="@color/white"/>
android:layout_gravity="center" />
<ImageView
android:layout_width="36dp"
......
......@@ -126,7 +126,7 @@
android:id="@+id/filterIssue"
android:layout_width="27dp"
android:layout_height="27dp"
android:background="@color/white"
android:background="@null"
android:src="@drawable/filter" />
</LinearLayout>
......@@ -189,7 +189,7 @@
android:paddingVertical="21dp">
<LinearLayout
android:id="@+id/issues_click"
android:id="@+id/issueClick"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
......
......@@ -25,7 +25,7 @@
android:layout_height="59dp">
<ImageButton
android:id="@+id/back_button"
android:id="@+id/backButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
......
......@@ -25,7 +25,7 @@
android:layout_height="59dp">
<ImageButton
android:id="@+id/cancel_button"
android:id="@+id/cancelButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
......
......@@ -25,7 +25,7 @@
android:layout_height="59dp">
<ImageButton
android:id="@+id/back_button"
android:id="@+id/backButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
......@@ -70,7 +70,7 @@
android:textStyle="bold" />
<EditText
android:id="@+id/input_remarks"
android:id="@+id/inputRemarks"
android:layout_width="match_parent"
android:layout_height="115dp"
android:layout_marginTop="10dp"
......@@ -224,7 +224,7 @@
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/back_button_bot"
android:id="@+id/backButtonBot"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
......@@ -241,7 +241,7 @@
app:strokeWidth="1dp" />
<Button
android:id="@+id/confirm_button"
android:id="@+id/confirmButton"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
......
......@@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/syncAlert"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintHeight="match_parent"
android:layout_height="wrap_content"
app:layout_constraintHeight="wrap_content"
app:layout_constraintWidth="match_parent"
android:background="@drawable/alert_border">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment