Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Suggest Activity #14

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions XpensAuditor/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
android:supportsRtl="true"
android:theme="@style/Theme.XpensAuditor"
tools:targetApi="31">
<activity
android:name=".Suggest"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".SMSTransacShowActivity"
android:exported="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,8 @@ else if (id == R.id.nav_rate) {
startActivity(i);

} else if (id == R.id.nav_suggest) {
//todo
// Intent i=new Intent(this,Suggest.class);
// startActivity(i);
Intent i=new Intent(this,Suggest.class);
startActivity(i);

} else if (id == R.id.nav_share) {

Expand Down
37 changes: 37 additions & 0 deletions XpensAuditor/app/src/main/java/com/xa/xpensauditor/Suggest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.xa.xpensauditor;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class Suggest extends AppCompatActivity implements View.OnClickListener{

EditText e;
Button b;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_suggest);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
//setSupportActionBar(toolbar);


e=(EditText)findViewById(R.id.editText5);
b=(Button)findViewById(R.id.button3);
b.setOnClickListener(this);
}

@Override
public void onClick(View v) {
String str=e.getText().toString();
Toast.makeText(this, "Suggestion submitted", Toast.LENGTH_SHORT).show();
Intent i = new Intent(this,HomeActivity.class);
startActivity(i);
}
}
24 changes: 24 additions & 0 deletions XpensAuditor/app/src/main/res/layout/activity_suggest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Suggest">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"
app:layout_constraintTop_toTopOf="parent">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</com.google.android.material.appbar.AppBarLayout>

<include layout="@layout/content_suggest" />
</androidx.constraintlayout.widget.ConstraintLayout>
43 changes: 43 additions & 0 deletions XpensAuditor/app/src/main/res/layout/content_suggest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.xa.xpensauditor.Suggest"
tools:showIn="@layout/activity_suggest"
android:background="@android:color/holo_blue_bright">

<EditText
android:id="@+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textMultiLine"
android:layout_marginTop="63dp"
android:layout_below="@+id/textView6"
android:layout_centerHorizontal="true" />

<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Please do let us know how we can help improve your experience"
android:textAlignment="center"
android:textSize="20dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="58dp" />

<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/editText5"
android:layout_centerHorizontal="true"
android:layout_marginTop="84dp"
android:text="DONE" />


</RelativeLayout>