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