Skip to content
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
2 changes: 2 additions & 0 deletions .idea/misc.xml

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

1 change: 1 addition & 0 deletions .idea/render.experimental.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 @@ -56,5 +56,6 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.dhaval2404:imagepicker:2.1'
implementation 'com.github.Theophrast:SquareImageView:1.0.1'

}
12 changes: 7 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.harshad.projectclean" >
package="com.harshad.projectclean">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
Expand All @@ -13,7 +13,10 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.ProjectClean" >
android:theme="@style/Theme.ProjectClean">
<activity
android:name=".GriDetail"
android:exported="false" />
<activity
android:name=".CreatePost"
android:exported="false" />
Expand All @@ -28,7 +31,7 @@
android:exported="false" />
<activity
android:name=".LoginActivity"
android:exported="true" >
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -37,8 +40,7 @@
</activity>
<activity
android:name=".MainActivity"
android:exported="false" >
</activity>
android:exported="false"></activity>
</application>

</manifest>
4 changes: 2 additions & 2 deletions app/src/main/java/com/harshad/projectclean/CreatePost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import java.io.File
class CreatePost : AppCompatActivity() {
private lateinit var binding: ActivityCreatePostBinding

val items = arrayOf("Option 1", "Option 2", "Option 3")
val items = arrayOf("Garbage", "Pothole", "Fallen Tree", "Other")
lateinit var actv :AutoCompleteTextView
lateinit var adapterItems : ArrayAdapter<String>
lateinit var imgFile:File
Expand Down Expand Up @@ -64,7 +64,7 @@ class CreatePost : AppCompatActivity() {


binding.btnSave.setOnClickListener {
val griTitle = binding.edDesc.text.trim().toString()
val griTitle = binding.edTitle.text.trim().toString()
val griDesc = binding.edDesc.text.trim().toString()
Log.d("Create Post","Gri Title $griTitle")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@ import androidx.recyclerview.widget.RecyclerView
import com.harshad.projectclean.APIRequests.ApiClient
import com.harshad.projectclean.APIRequests.grievance_data_class.*
import com.harshad.projectclean.grievance_recycler_view_classes.GrievanceRecycleViewAdapter
import com.harshad.projectclean.databinding.ActivityDisplayGrievanceBinding
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response

class DisplayGrievance : AppCompatActivity() {
private lateinit var binding: ActivityDisplayGrievanceBinding
lateinit var adapter: GrievanceRecycleViewAdapter
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_display_grievance)
binding = ActivityDisplayGrievanceBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)
getGriData(this)

}

fun getGriData(context:Context){
Expand Down
18 changes: 18 additions & 0 deletions app/src/main/java/com/harshad/projectclean/GriDetail.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.harshad.projectclean

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.harshad.projectclean.databinding.ActivityGriDetailBinding

class GriDetail : AppCompatActivity() {

private lateinit var binding: ActivityGriDetailBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

binding = ActivityGriDetailBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)

}
}
6 changes: 3 additions & 3 deletions app/src/main/java/com/harshad/projectclean/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LoginActivity : AppCompatActivity() {
binding = ActivityLoginBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)
sharedPref = getSharedPreferences("SP", Context.MODE_PRIVATE)
sharedPref = getSharedPreferences("SP", MODE_PRIVATE)
var isRemembered = sharedPref.getBoolean("REMEMBER", false)

if (isRemembered){
Expand All @@ -40,7 +40,7 @@ class LoginActivity : AppCompatActivity() {
finish()
}

sharedPref = getSharedPreferences("SP", Context.MODE_PRIVATE)
sharedPref = getSharedPreferences("SP", MODE_PRIVATE)


binding.btnLogin.setOnClickListener {
Expand All @@ -62,7 +62,7 @@ class LoginActivity : AppCompatActivity() {
fun login(context: Context, email: String, password: String) {
val apiClient: ApiClient = ApiClient()
val editor: SharedPreferences.Editor = sharedPref.edit()
var sharedPref = getSharedPreferences("SP", Context.MODE_PRIVATE)
var sharedPref = getSharedPreferences("SP", MODE_PRIVATE)

apiClient.authenticationApiRequests()
.login(LoginRequest(email = email, password = password))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.bumptech.glide.Glide
import com.harshad.projectclean.APIRequests.URLConstants
import com.harshad.projectclean.APIRequests.grievance_data_class.SingleGrievanceResponse
import com.harshad.projectclean.R
import com.theophrast.ui.widget.SquareImageView


class GrievanceRecycleViewAdapter(private val context: Context, private val grievance_Response_list:List<SingleGrievanceResponse>):RecyclerView.Adapter<GrievanceRecycleViewAdapter.GrievanceViewHolder>() {
Expand All @@ -27,7 +28,11 @@ class GrievanceRecycleViewAdapter(private val context: Context, private val grie
override fun onBindViewHolder(holder: GrievanceViewHolder, position: Int) {
Glide.with(context).load("${URLConstants.BASE_URL}${grievance_Response_list[position].gri_img}").into(holder.gri_img)
holder.gri_title.text = grievance_Response_list[position].gri_title
holder.gri_cat.text = grievance_Response_list[position].gri_category.cat_name
holder.gri_desc.text = grievance_Response_list[position].gri_desc
holder.gri_user.text = grievance_Response_list[position].gri_uploaded_user.citi_user.username
// holder.gri_location.text =grievance_Response_list[position].gri_locationResponse.loc_display_name
holder.gri_rank.text= grievance_Response_list[position].gri_priority.toString()
holder.gri_like_btn.setOnClickListener {
Log.d("Gri Recycler View","Inside on bind viewHolder ${grievance_Response_list[position].id} ${grievance_Response_list[position].gri_title} ${sharedPref.getString("user_first_name","No name")}")
}
Expand All @@ -39,12 +44,15 @@ class GrievanceRecycleViewAdapter(private val context: Context, private val grie
}

class GrievanceViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
var gri_title = itemView.findViewById<TextView>(R.id.tv_gri_title)
var gri_location = itemView.findViewById<TextView>(R.id.tv_gri_location)
var gri_desc = itemView.findViewById<TextView>(R.id.tvDesc)
var gri_img = itemView.findViewById<ImageView>(R.id.iv_gri_img)
var gri_like_btn = itemView.findViewById<Button>(R.id.btn_griLike)
var gri_comment_btn = itemView.findViewById<Button>(R.id.btn_griComment)
var gri_user = itemView.findViewById<TextView>(R.id.textVUsername)
var gri_title = itemView.findViewById<TextView>(R.id.textVtitle)
var gri_rank = itemView.findViewById<TextView>(R.id.textVRank)
var gri_cat = itemView.findViewById<TextView>(R.id.textVCat)
var gri_location = itemView.findViewById<TextView>(R.id.textVlocation)
var gri_desc = itemView.findViewById<TextView>(R.id.textVDesc)
var gri_img = itemView.findViewById<SquareImageView>(R.id.post_image)
var gri_like_btn = itemView.findViewById<ImageView>(R.id.icon_up)
var gri_comment_btn = itemView.findViewById<ImageView>(R.id.iconComments)
}

}
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/blue_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/sky_blue"/>
<corners android:radius="8dp"/>

</shape>
8 changes: 8 additions & 0 deletions app/src/main/res/drawable/btn_shape_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<stroke
android:width="1dp"
android:color="@color/lightgray"/>
<corners android:radius="5dp"/>
</shape>
Binary file added app/src/main/res/drawable/camera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/color_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#614385"
android:endColor="#516395"
android:angle="0"/>
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/color_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#5f2c82"
android:endColor="#49a09d"
android:angle="45"/>
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/color_3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#4776E6"
android:endColor="#8E54E9"
android:angle="90"/>
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/color_4.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#7141e2"
android:endColor="#d46cb3"
android:angle="135"/>
</shape>
Binary file added app/src/main/res/drawable/comments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/defualt_insta_pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/facebook24px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/facebook32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/facebook64px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/gender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/ic_add_story.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">

<path
android:fillColor="#0C96DC"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
<path android:fillColor="@android:color/white"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>

</vector>

<!--android:tint="#0C96DC"-->
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_birth.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_check_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="64dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="64dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_close_wrong.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="64dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="64dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_edit_profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,5.9c1.16,0 2.1,0.94 2.1,2.1s-0.94,2.1 -2.1,2.1S9.9,9.16 9.9,8s0.94,-2.1 2.1,-2.1m0,9c2.97,0 6.1,1.46 6.1,2.1v1.1L5.9,18.1L5.9,17c0,-0.64 3.13,-2.1 6.1,-2.1M12,4C9.79,4 8,5.79 8,8s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,13c-2.67,0 -8,1.34 -8,4v3h16v-3c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_email.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_logout_exit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
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="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_phone.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M16,1L8,1C6.34,1 5,2.34 5,4v16c0,1.66 1.34,3 3,3h8c1.66,0 3,-1.34 3,-3L19,4c0,-1.66 -1.34,-3 -3,-3zM14,21h-4v-1h4v1zM17.25,18L6.75,18L6.75,4h10.5v14z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_story_delete.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_story_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zM12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
</vector>
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/insta_animation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/color_1"
android:duration="10000" />
<item
android:drawable="@drawable/color_2"
android:duration="10000" />
<item
android:drawable="@drawable/color_3"
android:duration="10000" />
<item
android:drawable="@drawable/color_4"
android:duration="10000" />
</animation-list>
Binary file added app/src/main/res/drawable/instagram_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/option.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/redheart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/send.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/up_fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading