Skip to content

Commit

Permalink
Worked on two NGO sign up pages for collecting their registration data
Browse files Browse the repository at this point in the history
  • Loading branch information
1HazArd1 committed Sep 14, 2022
1 parent 1b5793f commit 814b5e3
Show file tree
Hide file tree
Showing 15 changed files with 126 additions and 70 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies {
implementation 'com.google.firebase:firebase-firestore-ktx:24.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.firebase:firebase-firestore:24.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/java/com/hazard/samarpan/ngo/NgoSignup1Fragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.fragment.app.Fragment
import com.google.android.material.textfield.TextInputLayout
import com.hazard.samarpan.R

class NgoSignup1Fragment : Fragment() {

private lateinit var nextBtn: Button

private var orgName : TextInputLayout ?=null
private var orgMail : TextInputLayout ?=null
private var orgPhone : TextInputLayout ?=null
private var officeAdd :TextInputLayout ?=null
private var orgPinCode :TextInputLayout ?=null
private var pass :TextInputLayout ?=null
private var confirmPass :TextInputLayout ?=null

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
Expand All @@ -21,6 +30,16 @@ class NgoSignup1Fragment : Fragment() {

nextBtn = v.findViewById(R.id.btn_ngosignup1_next)
nextBtn.setOnClickListener {

orgName = v?.findViewById(R.id.et_ngosignup_name)
orgMail = v?.findViewById(R.id.et_ngosignup_mail)
orgPhone = v?.findViewById(R.id.et_ngosignup_phone)
officeAdd = v?.findViewById(R.id.et_ngosignup_address)
orgPinCode = v?.findViewById(R.id.et_ngosignup_pincode)
pass =v?.findViewById(R.id.et_ngosignup_password)
confirmPass =v?.findViewById(R.id.et_ngosignup_confirmpassword)

//this opens up the sign up 2 page
activity?.supportFragmentManager?.beginTransaction()
?.replace(
R.id.fragment_container1,
Expand Down
37 changes: 0 additions & 37 deletions app/src/main/java/com/hazard/samarpan/ngo/NgoSignup2Fragment.java

This file was deleted.

28 changes: 28 additions & 0 deletions app/src/main/java/com/hazard/samarpan/ngo/NgoSignup2Fragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.hazard.samarpan.ngo

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ArrayAdapter
import android.widget.AutoCompleteTextView
import androidx.fragment.app.Fragment
import com.hazard.samarpan.R

class NgoSignup2Fragment : Fragment(){
private var v : View?=null
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
v = layoutInflater.inflate(R.layout.ngo_signup2_fragment,container,false)

val types = resources.getStringArray(R.array.organisation_type)
val arrayAdapter = ArrayAdapter(requireContext(),R.layout.dropdown_item,types)
val autoCompleteTV= v?.findViewById<AutoCompleteTextView>(R.id.ngosignup_select_orgtype_items)
autoCompleteTV?.setAdapter(arrayAdapter)

return v
}
}
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_baseline_android_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#F3DD13"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17.6,11.48 L19.44,8.3a0.63,0.63 0,0 0,-1.09 -0.63l-1.88,3.24a11.43,11.43 0,0 0,-8.94 0L5.65,7.67a0.63,0.63 0,0 0,-1.09 0.63L6.4,11.48A10.81,10.81 0,0 0,1 20L23,20A10.81,10.81 0,0 0,17.6 11.48ZM7,17.25A1.25,1.25 0,1 1,8.25 16,1.25 1.25,0 0,1 7,17.25ZM17,17.25A1.25,1.25 0,1 1,18.25 16,1.25 1.25,0 0,1 17,17.25Z"/>
</vector>
40 changes: 37 additions & 3 deletions app/src/main/res/layout/category_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,46 @@
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:contentDescription="category"
android:background="@color/theme_background"
>
android:background="@color/theme_background">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:layout_margin="10dp">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="190dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="20dp"
android:background="#EA4C46">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Clothing"
android:textSize="30sp"
android:textColor="@color/theme_text_color_heading"
android:fontFamily="@font/roboto_medium"
android:padding="25dp"/>
</RelativeLayout>
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/ic_baseline_android_24"
android:layout_marginTop="-40dp"
android:layout_alignParentRight="true"/>
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="20dp"
android:background="#C46200">

</RelativeLayout>
</LinearLayout>
</ScrollView>
9 changes: 9 additions & 0 deletions app/src/main/res/layout/dropdown_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sample"
android:padding="14dp"
android:textColor="@color/theme_text_color_heading"
android:textSize="14sp"
xmlns:android="http://schemas.android.com/apk/res/android"/>
12 changes: 0 additions & 12 deletions app/src/main/res/layout/dropdown_menu_popup_item.xml

This file was deleted.

19 changes: 9 additions & 10 deletions app/src/main/res/layout/ngo_signup2_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@
<com.google.android.material.textfield.TextInputLayout

style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:id="@+id/ngosignup_select_orgtype"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:hint="@string/oragnization_type"
android:layout_marginTop="35dp"
android:hint="@string/organization_type"
android:orientation="horizontal"
app:boxStrokeColor="@color/black"
app:hintTextColor="@color/theme_text_color_body">

<AutoCompleteTextView
android:id="@+id/ngosignup_select_orgtype"
android:id="@+id/ngosignup_select_orgtype_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:inputType="none"/>

</com.google.android.material.textfield.TextInputLayout>
Expand Down Expand Up @@ -179,17 +180,15 @@
</LinearLayout>

<Button
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/button_design"
android:layout_marginTop="85dp"
android:layout_marginBottom="25dp"
android:enabled="true"
android:paddingLeft="50dp"
android:paddingTop="15dp"
android:paddingRight="50dp"
android:paddingBottom="15dp"
android:elevation="35dp"
android:textAllCaps="false"
android:textColor="@color/theme_button_text"
android:text="@string/get_started" />

</LinearLayout>
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<string name="registration_certificate">Registration Certificate</string>
<string name="pan_card">Pan Card</string>
<string name="upload_below_documents">Upload below documents</string>
<string name="oragnization_type">Oragnization type</string>
<string name="organization_type">Oragnization type</string>
<string name="get_started">Get started</string>
<string name="ngosignup1_phone_number">Phone number</string>
<string name="next">Next</string>
Expand All @@ -27,4 +27,15 @@
<string name="book_sharing_text">Now share your books with your friends</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>


<!-- Organisation types for ngo_signup2_fragment -->
<string-array name="organisation_type">
<item>Trusts (Charitable Trusts)</item>
<item>Societies</item>
<item>Section 8 Company</item>
<item>Private Non Profit Company</item>
<item>Others</item>
</string-array>

</resources>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.1'
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.gms:google-services:4.3.13'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jan 08 22:29:54 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 814b5e3

Please sign in to comment.