[go: up one dir, main page]

0% found this document useful (0 votes)
18 views29 pages

MainActivity for Property Listings App

The MainActivity class in this Android application initializes the user interface and manages navigation to various property-related activities such as ApartmentActivity, VillaActivity, and others. It retrieves the user's language preference and sets the locale accordingly, while also populating a list of properties with details like type, location, price, and descriptions. The app features a bottom menu for quick access to the profile, explore, and bookmark sections.

Uploaded by

shadsiddiqui1818
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views29 pages

MainActivity for Property Listings App

The MainActivity class in this Android application initializes the user interface and manages navigation to various property-related activities such as ApartmentActivity, VillaActivity, and others. It retrieves the user's language preference and sets the locale accordingly, while also populating a list of properties with details like type, location, price, and descriptions. The app features a bottom menu for quick access to the profile, explore, and bookmark sections.

Uploaded by

shadsiddiqui1818
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

 MainActivity.

java
package [Link];

import [Link];
import [Link];
import [Link];
import [Link];

import [Link];
import [Link];

import [Link];
import [Link];
import [Link].project2282.R;
import [Link];

import [Link];
import [Link];

public class MainActivity extends AppCompatActivity {


private ActivityMainBinding binding;

@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);

// Apply the saved language preference


SharedPreferences preferences = getSharedPreferences("LanguagePrefs", MODE_PRIVATE);
String language = [Link]("language", "en");
setLocale(language);

// Set content view


binding = [Link](getLayoutInflater());
setContentView([Link]());

[Link](v -> {
// Navigate to the ProfileActivity2 when the back button is clicked
Intent intent = new Intent([Link], [Link]);
startActivity(intent);
finish(); // Optional: Finish the current activity so it's removed from the back stack
});

[Link](v -> {
// Navigate to the ProfileActivity2 when the back button is clicked
Intent intent = new Intent([Link], [Link]);
startActivity(intent);
finish(); // Optional: Finish the current activity so it's removed from the back stack
});

[Link](v -> {
// Navigate to the ProfileActivity2 when the back button is clicked
Intent intent = new Intent([Link], [Link]);
startActivity(intent);
finish(); // Optional: Finish the current activity so it's removed from the back stack
});

[Link](v -> {
// Navigate to the ProfileActivity2 when the back button is clicked
Intent intent = new Intent([Link], [Link]);
startActivity(intent);
finish(); // Optional: Finish the current activity so it's removed from the back stack
});

initList();
initLocation();
initBottomMenu();

private void initBottomMenu() {


[Link](i -> {
if (i == [Link]) {
startActivity(new Intent([Link], [Link]));
} else if (i == [Link]) {
startActivity(new Intent([Link],[Link]));
} else if (i == [Link]){
startActivity(new Intent([Link],[Link]));
}
});
}

private void initList() {


ArrayList<PropertyDomain> items = new ArrayList<>();
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles LA", "pic_3", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "Beauty House", "NewYork NY", "pic_4", 1750, 3, 2, 1100, true, 4.3, "This 3 bed /2 bath home boasts an enormous, open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_1", 1500, 2, 3, 350, true, 4.5, "This 2 bed /3 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));
[Link](new PropertyDomain("House", "House with great view", "NewYork NY", "pic_2", 800, 1, 2, 500, false, 4.9, "This 1 bed /2 bath home boasts an enormous, open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings."));

[Link](new LinearLayoutManager(this, [Link], false));


[Link](new ListitemsAdapter(items));

ArrayList<PropertyDomain> itemsNear = new ArrayList<>();


[Link](new PropertyDomain("House", "beauty house", "Newyork NY", "pic_1", 1750, 3, 2, 1100, true, 4.3, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles La", "pic_2", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "House with Great View", "Newyork NY", "pic_3", 800, 1, 2, 500, false, 4.9, "This 2 bed /1 bath home boasts an enormous,open-living plan,
accented by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_4", 1500, 2, 3, 350, true, 4.5, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented
by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "beauty house", "Newyork NY", "pic_1", 1750, 3, 2, 1100, true, 4.3, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles La", "pic_2", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "House with Great View", "Newyork NY", "pic_3", 800, 1, 2, 500, false, 4.9, "This 2 bed /1 bath home boasts an enormous,open-living plan,
accented by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_4", 1500, 2, 3, 350, true, 4.5, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented
by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "beauty house", "Newyork NY", "pic_1", 1750, 3, 2, 1100, true, 4.3, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles La", "pic_2", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "House with Great View", "Newyork NY", "pic_3", 800, 1, 2, 500, false, 4.9, "This 2 bed /1 bath home boasts an enormous,open-living plan,
accented by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_4", 1500, 2, 3, 350, true, 4.5, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented
by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "beauty house", "Newyork NY", "pic_1", 1750, 3, 2, 1100, true, 4.3, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles La", "pic_2", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "House with Great View", "Newyork NY", "pic_3", 800, 1, 2, 500, false, 4.9, "This 2 bed /1 bath home boasts an enormous,open-living plan,
accented by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_4", 1500, 2, 3, 350, true, 4.5, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented
by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "beauty house", "Newyork NY", "pic_1", 1750, 3, 2, 1100, true, 4.3, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by
striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Villa", "Royal Villa", "LosAngles La", "pic_2", 999, 2, 1, 400, true, 4.7, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented by striking
architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("House", "House with Great View", "Newyork NY", "pic_3", 800, 1, 2, 500, false, 4.9, "This 2 bed /1 bath home boasts an enormous,open-living plan,
accented by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));
[Link](new PropertyDomain("Apartment", "Royal Apartment", "LosAngles LA", "pic_4", 1500, 2, 3, 350, true, 4.5, "This 2 bed /1 bath home boasts an enormous,open-living plan, accented
by striking architectural features and high-end finishes. Feel inspired by open sight lines that embrace the outdoors, crowned by stunning coffered ceilings. "));

[Link](new LinearLayoutManager(this, [Link], false));


[Link](new ListitemsAdapter(itemsNear));
}

private void initLocation() {


String[] items = new String[]{"LosAngles, USA", "NewYork, USA"};

ArrayAdapter<String> adapter = new ArrayAdapter<>(this, [Link].simple_spinner_item, items);


[Link]([Link].simple_spinner_dropdown_item);

[Link](adapter);
}

// Method to update the app language dynamically


private void setLocale(String lang) {
Locale locale = new Locale(lang);
[Link](locale);
[Link] config = getResources().getConfiguration();
[Link](locale);
getResources().updateConfiguration(config, getResources().getDisplayMetrics());
}
}

 Login [Link]
package [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link].project2282.R;

import [Link];

import [Link];

import [Link];

import [Link];

public class LoginActivity extends AppCompatActivity {

private FirebaseAuth auth;

private EditText username, password;

private TextView signupText;

private Button loginButton;

@Override

protected void onCreate(Bundle savedInstanceState) {

[Link](savedInstanceState);

[Link](this);

setContentView([Link].activity_login);

auth= [Link]();

username = findViewById([Link]);

password = findViewById([Link]);

loginButton = findViewById([Link]);

signupText = findViewById([Link]);

// Set the onClickListener for the login button

[Link](new [Link]() {

@Override

public void onClick(View v) {

// Get the values from the EditText fields


String email = [Link]().toString();

String pass = [Link]().toString();

// Check if the username or password fields are empty

if (![Link]() && Patterns.EMAIL_ADDRESS.matcher(email).matches()) {

if (![Link]()) {

[Link](email, pass)

.addOnSuccessListener(new OnSuccessListener<AuthResult>() {

@Override

public void onSuccess(AuthResult authResult) {

[Link]([Link], "Login Successful", Toast.LENGTH_SHORT).show();

startActivity(new Intent([Link], [Link]));

finish();

}).addOnFailureListener(new OnFailureListener() {

@Override

public void onFailure(@NonNull Exception e) {

[Link]([Link], "Login Failed", Toast.LENGTH_SHORT).show();

});

} else {

[Link]("Empty fields are not allowed");

} else if ([Link]()) {

[Link]("Empty fields are not allowed");

} else {

[Link]("Please enter correct email");

});

// Set the onClickListener for the signupText

[Link](new [Link]() {

@Override

public void onClick(View view) {

startActivity(new Intent([Link],[Link]));

});

 [Link]
package [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link];
import [Link];

import [Link];

import [Link].project2282.R;

import [Link];

import [Link];

import [Link];

import [Link];

public class SignupActivity extends AppCompatActivity {

private FirebaseAuth auth;

private EditText signupEmail, signupPassword;

private Button signupButton;

private TextView loginText;

// Declare the fields for user input

@Override

protected void onCreate(Bundle savedInstanceState) {

[Link](savedInstanceState);

setContentView([Link].activity_signup);

auth=[Link]();

signupEmail=findViewById([Link]);

signupPassword=findViewById([Link]);

signupButton=findViewById([Link]);

loginText=findViewById([Link]);

[Link](new [Link]() {

@Override

public void onClick(View v) {

String user= [Link]().toString().trim();

String pass=[Link]().toString().trim();

if ([Link]()){

[Link]("Email cannot be empty");

if ([Link]()) {

[Link]("Password cannot be empty");

} else {

[Link](user,pass).addOnCompleteListener(new OnCompleteListener<AuthResult>() {

@Override

public void onComplete(@NonNull Task<AuthResult> task) {

if ([Link]()){

[Link]([Link], "SignUp Successfull", Toast.LENGTH_SHORT).show();

startActivity(new Intent([Link],[Link]));

} else {

[Link]([Link], "SignUp Failed"+ [Link]().getMessage(), Toast.LENGTH_SHORT).show();


}

});

});

[Link](new [Link]() {

@Override

public void onClick(View v) {

startActivity(new Intent([Link],[Link]));

});

 [Link]
package [Link];

import [Link];

import [Link];

import [Link];

public class EmiActivity extends AppCompatActivity {

private ActivityEmiBinding binding;

@Override

protected void onCreate(Bundle savedInstanceState) {

[Link](savedInstanceState);

// Inflate the binding

binding = [Link](getLayoutInflater());

setContentView([Link]());

// Back button listener

[Link](v -> onBackPressed());

// Calculate EMI

[Link](v -> calculateEMI());

private void calculateEMI() {

try {
double principal = [Link]([Link]().toString());

double annualRate = [Link]([Link]().toString());

int tenureYears = [Link]([Link]().toString());

double monthlyRate = annualRate / 12 / 100;

int months = tenureYears * 12;

double emi = (principal * monthlyRate * [Link](1 + monthlyRate, months)) /

([Link](1 + monthlyRate, months) - 1);

double totalPayment = emi * months;

double totalInterest = totalPayment - principal;

String result = [Link](

"Monthly EMI: ₹%.2f\nTotal Interest: ₹%.2f\nTotal Payment: ₹%.2f",

emi, totalInterest, totalPayment

);

[Link](result);

} catch (Exception e) {

[Link]("Please enter valid values.");

 [Link]
package [Link];

import [Link];
import [Link];
import [Link].*;
import [Link];
import [Link].*;
import [Link].*;
import [Link].project2282.R;

public class ChatActivity extends AppCompatActivity {

private List<Message> messages = new ArrayList<>();


private chatAdapter adapter;
private EditText input;
private RecyclerView chatView;

private Map<String, String> qaMap = new HashMap<String, String>() {{


put("hello", "Hi! How can I help you?");
put("what is your name", "I am your virtual assistant.");
put("how can i contact support", "You can email us at support@[Link]");
put("what are your working hours", "We’re open from 9 AM to 6 PM.");
}};

@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_chat);

input = findViewById([Link].input_message);
Button sendBtn = findViewById([Link].send_button);
chatView = findViewById([Link].chat_recycler);

adapter = new chatAdapter(messages, this);


[Link](new LinearLayoutManager(this));
[Link](adapter);
[Link](new [Link]() {
@Override
public void onClick(View v) {
String userMsg = [Link]().toString().trim();
if (![Link]()) {
addMessage(userMsg, true);
respond(userMsg);
[Link]("");
}
}
});
}

private void addMessage(String text, boolean isUser) {


[Link](new Message(text, isUser));
[Link]([Link]() - 1);
[Link]([Link]() - 1);
}

private void respond(String userMsg) {


String lower = [Link]();
String reply = [Link](lower, "Sorry, I didn’t understand that.");
addMessage(reply, false);
}
}

 [Link]
package [Link];

import [Link];

import [Link];

import [Link];

import [Link];

import [Link].ActivityProfile2Binding;

public class ProfileActivity2 extends AppCompatActivity {

private ActivityProfile2Binding binding;

@Override

protected void onCreate(Bundle savedInstanceState) {

[Link](savedInstanceState);

[Link](this);

binding=[Link](getLayoutInflater());

setContentView([Link]());

[Link](v -> {

// Start AccountActivity when the arrow is clicked

Intent intent = new Intent([Link], [Link]);

startActivity(intent);

});

[Link](v -> {

// Start AccountActivity when the arrow is clicked

Intent intent = new Intent([Link],[Link]);


startActivity(intent);

});

[Link](v -> {

// Start AccountActivity when the arrow is clicked

Intent intent = new Intent([Link],[Link]);

startActivity(intent);

});

[Link](v -> {

// Start AccountActivity when the arrow is clicked

Intent intent = new Intent([Link],[Link]);

startActivity(intent);

});

[Link](v -> {

// Start AccountActivity when the arrow is clicked

Intent intent = new Intent([Link],[Link]);

startActivity(intent);

});

[Link](v -> {

// Navigate to LoginActivity and clear the back stack

Intent intent = new Intent([Link], [Link]);

// Add flag to clear the back stack and start a new task

[Link](Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);

startActivity(intent);

finish(); // Finish ProfileActivity2 so it's removed from the back stack

});

 activity_main.xml
<?xml version="1.0" encoding="utf-8"?>

<[Link] xmlns:android="[Link]

xmlns:app="[Link]

xmlns:tools="[Link]

android:id="@+id/main"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/lightGrey"

tools:context=".[Link]" >

<[Link]

android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:paddingBottom="100dp">

<[Link]

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginStart="24dp"

android:layout_marginTop="48dp"

android:layout_marginEnd="24dp">

<ImageView

android:id="@+id/notifBtn"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/bell" />

<TextView

android:id="@+id/textView4"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Location"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent" />

<Spinner

android:id="@+id/locationSpin"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintEnd_toEndOf="@+id/textView4"

app:layout_constraintStart_toStartOf="@+id/textView4"

app:layout_constraintTop_toBottomOf="@+id/textView4" />

<ImageView

android:id="@+id/imageView3"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="@+id/locationSpin"

app:layout_constraintEnd_toStartOf="@+id/locationSpin"

app:layout_constraintTop_toBottomOf="@+id/textView4"

app:srcCompat="@drawable/location" />

</[Link]>

<EditText

android:id="@+id/searchEdt"
android:layout_width="match_parent"

android:layout_height="50dp"

android:layout_margin="24dp"

android:background="@color/white"

android:drawableStart="@drawable/search_icon"

android:drawableEnd="@drawable/settings"

android:drawableTint="@color/black"

android:drawablePadding="8dp"

android:ems="10"

android:hint="Search..."

android:inputType="text"

android:padding="8dp"

android:textColor="@color/black"

android:textColorHint="@color/black" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginStart="16dp"

android:layout_marginEnd="16dp"

android:orientation="horizontal">

<LinearLayout

android:id="@+id/cat1Btn"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="0.2"

android:orientation="vertical">

<[Link]

android:layout_width="60dp"

android:layout_height="60dp"

android:layout_gravity="center"

android:background="@drawable/border">

<ImageView

android:id="@+id/house"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/cat_1" />

</[Link]>

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="8dp"

android:text="House"

android:textAlignment="center"
android:textColor="@color/black"

android:textSize="12sp"

android:textStyle="bold" />

</LinearLayout>

<LinearLayout

android:id="@+id/cat2Btn"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="0.2"

android:orientation="vertical">

<[Link]

android:layout_width="60dp"

android:layout_height="60dp"

android:layout_gravity="center"

android:background="@color/lightGrey">

<ImageView

android:id="@+id/apartment"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/cat_2" />

</[Link]>

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="8dp"

android:text="Apartment"

android:textAlignment="center"

android:textColor="@color/black"

android:textSize="12sp"

android:textStyle="bold" />

</LinearLayout>

<LinearLayout

android:id="@+id/cat3Btn"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="0.2"

android:orientation="vertical">

<[Link]

android:layout_width="60dp"

android:layout_height="60dp"

android:layout_gravity="center"
android:background="@color/lightGrey">

<ImageView

android:id="@+id/villa"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/cat_3" />

</[Link]>

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="8dp"

android:text="Villa"

android:textAlignment="center"

android:textColor="@color/black"

android:textSize="12sp"

android:textStyle="bold" />

</LinearLayout>

<LinearLayout

android:id="@+id/cat4Btn"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="0.2"

android:orientation="vertical">

<[Link]

android:layout_width="60dp"

android:layout_height="60dp"

android:layout_gravity="center"

android:background="@color/lightGrey">

<ImageView

android:id="@+id/banglow"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/cat_4" />

</[Link]>

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"
android:layout_marginTop="8dp"

android:text="Bangola"

android:textAlignment="center"

android:textColor="@color/black"

android:textSize="12sp"

android:textStyle="bold" />

</LinearLayout>

<LinearLayout

android:id="@+id/cat5Btn"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="0.2"

android:orientation="vertical">

<[Link]

android:layout_width="60dp"

android:layout_height="60dp"

android:layout_gravity="center"

android:background="@color/lightGrey">

<ImageView

android:id="@+id/land"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/cat_5" />

</[Link]>

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="8dp"

android:text="Empty land"

android:textAlignment="center"

android:textColor="@color/black"

android:textSize="12sp"

android:textStyle="bold" />

</LinearLayout>

</LinearLayout>

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginStart="24dp"

android:layout_marginTop="24dp"

android:layout_marginEnd="24dp"

android:orientation="horizontal">
<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_weight="1"

android:text="Recommended Property"

android:textColor="@color/black"

android:textSize="16sp"

android:textStyle="bold" />

<TextView

android:id="@+id/seeAllRecommendBtn"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="See all"

android:textColor="@color/blue" />

</LinearLayout>

<[Link]

android:id="@+id/recommendedView"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:clipToPadding="false"

android:paddingStart="16dp"

android:paddingEnd="16dp" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginStart="24dp"

android:layout_marginTop="24dp"

android:layout_marginEnd="24dp"

android:orientation="horizontal">

<TextView

android:id="@+id/textView6"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_weight="1"

android:text="Nearby Property"

android:textColor="@color/black"

android:textSize="16sp"

android:textStyle="bold" />

<TextView

android:id="@+id/seeAllnearByBtn"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="See all"

android:textColor="@color/blue" />

</LinearLayout>
<[Link]

android:id="@+id/nearView"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:clipToPadding="false"

android:paddingStart="16dp"

android:paddingEnd="16dp" />

</LinearLayout>

</[Link]>

<[Link]

android:layout_width="match_parent"

android:layout_height="100dp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent">

<[Link]

android:layout_width="match_parent"

android:layout_height="72dp"

android:layout_gravity="bottom"/>

</[Link]>

<[Link]

android:id="@+id/bottomMenu"

android:layout_width="match_parent"

android:layout_height="70dp"

android:background="@drawable/black_bg"

android:elevation="3dp"

android:padding="4dp"

app:cnb_iconSize="20dp"

app:cnb_menuResource="@menu/bottom_menu"

app:cnb_radius="50dp"

app:cnb_unselectedColor="@color/white"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent" />

</[Link]>

 activity_login.xml
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="[Link]

xmlns:app="[Link]

xmlns:tools="[Link]

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:gravity="center"

android:background="@drawable/loginpic"
tools:context=".[Link]">

<[Link]

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_margin="30dp"

app:cardCornerRadius="30dp"

app:cardElevation="20dp"

android:background="@drawable/customedit">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:layout_gravity="center_horizontal"

android:padding="24dp">

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Login"

android:id="@+id/loginText"

android:textSize="36sp"

android:textAlignment="center"

android:textStyle="bold"

android:textColor="@color/orange"/>

<EditText

android:layout_width="match_parent"

android:layout_height="50dp"

android:id="@+id/username"

android:background="@drawable/customedit"

android:drawableLeft="@drawable/baseline_person_24"

android:drawablePadding="8dp"

android:hint="Username"

android:padding="8dp"

android:textColor="@color/black"

android:textColorHighlight="@color/cardview_dark_background"

android:layout_marginTop="40dp"/>

<EditText

android:layout_width="match_parent"

android:layout_height="50dp"

android:id="@+id/password"

android:background="@drawable/customedit"

android:drawableLeft="@drawable/baseline_lock_24"

android:drawablePadding="8dp"

android:hint="Password"

android:padding="8dp"

android:inputType="textPassword"

android:textColor="@color/black"

android:textColorHighlight="@color/cardview_dark_background"

android:layout_marginTop="20dp"/>

<Button

android:layout_width="match_parent"

android:layout_height="60dp"

android:id="@+id/loginButton"

android:text="Login"
android:textSize="18sp"

android:layout_marginTop="30dp"

android:backgroundTint="@color/orange"

app:cornerRadius="20dp"/>

</LinearLayout>

</[Link]>

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:padding="8dp"

android:text="Not yet registered? SignUp Now"

android:textSize="16sp"

android:textAlignment="center"

android:id="@+id/signupText"

android:textColor="@color/black"

android:layout_marginBottom="20dp"/>

</LinearLayout>

 activity_signup.xml
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="[Link]

xmlns:app="[Link]

xmlns:tools="[Link]

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:gravity="center"

android:background="@drawable/loginpic"

tools:context=".[Link]">

<[Link]

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_margin="30dp"

app:cardCornerRadius="30dp"

app:cardElevation="20dp"

android:background="@drawable/customedit">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:layout_gravity="center_horizontal"

android:padding="24dp">
<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Sign Up"

android:textSize="36sp"

android:textAlignment="center"

android:textStyle="bold"

android:textColor="@color/orange"/>

<EditText

android:layout_width="match_parent"

android:layout_height="50dp"

android:id="@+id/signupName"

android:background="@drawable/customedit"

android:drawableLeft="@drawable/baseline_person_24"

android:drawablePadding="8dp"

android:hint="Name"

android:padding="8dp"

android:textColor="@color/black"

android:layout_marginTop="20dp"/>

<EditText

android:layout_width="match_parent"

android:layout_height="50dp"

android:id="@+id/signupEmail"

android:background="@drawable/customedit"

android:drawableLeft="@drawable/baseline_attach_email_24"

android:drawablePadding="8dp"

android:hint="Email"

android:padding="8dp"

android:textColor="@color/black"

android:layout_marginTop="20dp"/>

<EditText

android:layout_width="match_parent"

android:layout_height="50dp"

android:id="@+id/signupMobile"

android:background="@drawable/customedit"

android:drawableLeft="@drawable/baseline_add_ic_call_24"

android:drawablePadding="8dp"

android:hint="Mobile Number"

android:padding="8dp"

android:textColor="@color/black"

android:layout_marginTop="20dp"/>
<EditText

android:layout_width="match_parent"

android:layout_height="50dp"

android:id="@+id/signupPassword"

android:background="@drawable/customedit"

android:drawableLeft="@drawable/baseline_lock_24"

android:drawablePadding="8dp"

android:hint="Password"

android:padding="8dp"

android:inputType="textPassword"

android:textColor="@color/black"

android:layout_marginTop="20dp"/>

<Button

android:layout_width="match_parent"

android:layout_height="60dp"

android:id="@+id/signupButton"

android:text="Sign Up"

android:textSize="18sp"

android:layout_marginTop="30dp"

android:backgroundTint="@color/orange"

app:cornerRadius="20dp"/>

</LinearLayout>

</[Link]>

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:padding="8dp"

android:text="Already registered? Login Now"

android:textSize="14sp"

android:textAlignment="center"

android:id="@+id/loginText"

android:textColor="@color/black"

android:layout_marginBottom="20dp"/>

</LinearLayout>

 activity_profile.xml
<?xml version="1.0" encoding="utf-8"?>

<[Link]
xmlns:android="[Link]

xmlns:tools="[Link]

xmlns:app="[Link]

android:id="@+id/main"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/lightGrey"

tools:context=".Activity.ProfileActivity2">

<[Link]

android:layout_width="match_parent"

android:layout_height="match_parent">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:paddingBottom="100dp">

<[Link]

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginHorizontal="16dp"

android:layout_marginTop="48dp">

<ImageView

android:id="@+id/backBtn"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/back" />

<TextView

android:id="@+id/textView6"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Profile"

android:textColor="@color/black"

android:textSize="24sp"

android:textStyle="bold"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="@+id/backBtn"

app:layout_constraintTop_toTopOf="parent" />

</[Link]>
<ImageView

android:id="@+id/imageView9"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="16dp"

app:srcCompat="@drawable/profile" />

<TextView

android:id="@+id/textView7"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Hina Khan"

android:textAlignment="center"

android:textColor="@color/black"

android:textSize="20sp"

android:textStyle="bold" />

<TextView

android:id="@+id/textView8"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="+91 78170 98140"

android:textAlignment="center"

android:textSize="16sp" />

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="hinakhan11@[Link]"

android:textAlignment="center"

android:textSize="16sp" />

<[Link]

android:layout_width="match_parent"

android:layout_height="60dp"

android:layout_marginHorizontal="16dp"

android:layout_marginTop="32dp"

android:layout_marginBottom="8dp"

android:background="@drawable/white_bg">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginStart="24dp"

android:layout_marginBottom="2dp"

android:text="Account Information"

android:textColor="@color/black"

android:textSize="18sp"
android:textStyle="bold"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent" />

<ImageView

android:id="@+id/accountArrow"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginEnd="18dp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/arrow" />

</[Link]>

<[Link]

android:layout_width="match_parent"

android:layout_height="60dp"

android:layout_marginHorizontal="16dp"

android:layout_marginVertical="8dp"

android:background="@drawable/white_bg">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginStart="24dp"

android:layout_marginBottom="2dp"

android:text="Language"

android:textColor="@color/black"

android:textSize="18sp"

android:textStyle="bold"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent" />

<ImageView

android:id="@+id/gotolanguage"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginEnd="18dp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/arrow" />

</[Link]>

<[Link]

android:layout_width="match_parent"

android:layout_height="60dp"

android:layout_marginHorizontal="16dp"

android:layout_marginVertical="8dp"

android:background="@drawable/white_bg">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginStart="24dp"

android:layout_marginBottom="2dp"

android:text="Terms &amp; Condition"

android:textColor="@color/black"

android:textSize="18sp"

android:textStyle="bold"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent" />

<ImageView

android:id="@+id/terms"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginEnd="18dp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/arrow" />

</[Link]>

<[Link]

android:layout_width="match_parent"

android:layout_height="60dp"

android:layout_marginHorizontal="16dp"

android:layout_marginVertical="8dp"

android:background="@drawable/white_bg">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginStart="24dp"

android:layout_marginBottom="2dp"

android:text="Privacy Policy"

android:textColor="@color/black"
android:textSize="18sp"

android:textStyle="bold"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent" />

<ImageView

android:id="@+id/privacy"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginEnd="18dp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/arrow" />

</[Link]>

<[Link]

android:layout_width="match_parent"

android:layout_height="60dp"

android:layout_marginHorizontal="16dp"

android:layout_marginVertical="8dp"

android:background="@drawable/white_bg">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginStart="24dp"

android:layout_marginBottom="2dp"

android:text="Security"

android:textColor="@color/black"

android:textSize="18sp"

android:textStyle="bold"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent" />

<ImageView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginEnd="18dp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintTop_toTopOf="parent"

app:srcCompat="@drawable/arrow" />

</[Link]>

<LinearLayout
android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="horizontal">

<Button

android:id="@+id/logout"

android:layout_width="20dp"

android:layout_height="70dp"

android:layout_weight="1"

android:textSize="16sp"

android:paddingTop="12dp"

android:textStyle="bold"

android:text="LOGOUT" />

</LinearLayout>

</LinearLayout>

</[Link]>

</[Link]>

 activity_emi.xml
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="[Link]

xmlns:app="[Link]

xmlns:tools="[Link]

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:padding="16dp"

android:background="@android:color/white"

tools:ignore="ExtraText">

<!-- 🔙 Back Button -->

<ImageView

android:id="@+id/backBtn"

android:layout_width="40dp"

android:layout_height="40dp"

android:layout_marginTop="16dp"

android:layout_marginBottom="8dp"

android:src="@drawable/back"

android:contentDescription="Back"

android:layout_gravity="start" />

<!-- 💳 EMI Calculator Card -->

<[Link]

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="16dp"
app:cardCornerRadius="24dp"

app:cardElevation="8dp"

android:backgroundTint="#FFFFFF">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:padding="24dp">

<TextView

android:id="@+id/titleText"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="EMI Calculator"

android:textSize="26sp"

android:textStyle="bold"

android:textColor="@color/orange"

android:gravity="center" />

<EditText

android:id="@+id/loanAmount"

android:layout_width="match_parent"

android:layout_height="50dp"

android:hint="Loan Amount"

android:layout_marginTop="24dp"

android:inputType="numberDecimal"

android:background="@drawable/customedit"

android:padding="12dp"

android:textColor="@color/black" />

<EditText

android:id="@+id/interestRate"

android:layout_width="match_parent"

android:layout_height="50dp"

android:hint="Interest Rate (%)"

android:layout_marginTop="16dp"

android:inputType="numberDecimal"

android:background="@drawable/customedit"

android:padding="12dp"

android:textColor="@color/black" />

<EditText

android:id="@+id/loanTenure"

android:layout_width="match_parent"

android:layout_height="50dp"

android:hint="Loan Tenure (Years)"

android:layout_marginTop="16dp"

android:inputType="number"

android:background="@drawable/customedit"

android:padding="12dp"

android:textColor="@color/black" />
<Button

android:id="@+id/calculateBtn"

android:layout_width="match_parent"

android:layout_height="55dp"

android:text="Calculate EMI"

android:textSize="16sp"

android:layout_marginTop="24dp"

android:textColor="@android:color/white"

android:backgroundTint="@color/orange" />

<TextView

android:id="@+id/resultText"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="24dp"

android:text=""

android:textSize="16sp"

android:textColor="@color/black" />

</LinearLayout>

</[Link]>

</LinearLayout>

 activity_chat.xml
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="[Link]

android:background="#FFFFFF"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical">

<[Link]

android:id="@+id/chat_recycler"

android:layout_width="match_parent"

android:layout_height="0dp"

android:layout_weight="1"

android:padding="10dp" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal"

android:padding="8dp"

android:background="#FFA500">

<EditText

android:id="@+id/input_message"

android:layout_width="0dp"

android:layout_weight="1"

android:layout_height="wrap_content"

android:hint="Type here..."
android:background="#FFFFFF"

android:padding="10dp"/>

<Button

android:id="@+id/send_button"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Send"

android:background="#FFFFFF"

android:textColor="#FFA500"/>

</LinearLayout>

</LinearLayout>

You might also like