Skip to content

Commit

Permalink
map jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ikromovmirzokhid committed Dec 6, 2020
1 parent 1ca1389 commit 8445c9a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
15 changes: 15 additions & 0 deletions app/src/main/java/com/imb/jobtop/fragments/map/FragmentMapJobs.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.imb.jobtop.fragments.map

import android.os.Bundle
import android.view.View
import com.imb.jobtop.R
import com.imb.jobtop.fragments.base.BaseFragment

class FragmentMapJobs: BaseFragment(R.layout.fragment_map_jobs) {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.imb.jobtop.GetPhotoActivity
import com.imb.jobtop.R
import com.imb.jobtop.fragments.base.BaseFragment
import com.imb.jobtop.model.User
import com.imb.jobtop.utils.HawkUtils
import com.imb.jobtop.utils.PermissionHandler
import com.imb.jobtop.utils.extensions.progressOff
import com.imb.jobtop.utils.extensions.progressOn
Expand All @@ -47,7 +48,7 @@ class FragmentProfile : BaseFragment(R.layout.fragment_profile) {

private lateinit var auth: FirebaseAuth
private val db = lazy { Firebase.firestore }.value
private var user = User()
private var user = lazy { HawkUtils.user }.value

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
Expand Down Expand Up @@ -265,6 +266,7 @@ class FragmentProfile : BaseFragment(R.layout.fragment_profile) {
private fun setPhoto(bitmap: Bitmap?) {
isPhotoLoading = true
val bit = bitmap?.verticalRotate()
user.bitmap = bit

// loadBitmapOnServer(currentPhotoType, bit) {
// isPhotoLoading = false
Expand All @@ -273,7 +275,6 @@ class FragmentProfile : BaseFragment(R.layout.fragment_profile) {
// }

isPhotoLoading = false
user.bitmap = bitmap
setImageByType(bit)
}

Expand All @@ -292,6 +293,6 @@ class FragmentProfile : BaseFragment(R.layout.fragment_profile) {

override fun onDestroyView() {
super.onDestroyView()

HawkUtils.user = user
}
}
4 changes: 1 addition & 3 deletions app/src/main/res/layout/fragment_create_user_cv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@
android:layout_width="130dp"
android:layout_height="130dp"
android:layout_gravity="center_horizontal"
android:scaleType="fitXY"
android:src="@drawable/profile_img" />
android:src="@drawable/user_img" />

<TextView
android:id="@+id/name"
style="@style/Text.Black.Bold"
android:layout_gravity="center_horizontal"
android:text="Ikromov Mirzokhidjon"
android:textSize="18dp" />

<EditText
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/layout/fragment_map_jobs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">

</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
android:layout_gravity="center_horizontal|bottom"
android:layout_marginTop="1dp"
android:layout_marginBottom="@dimen/marginVeryHigh"
android:enabled="false"
android:enabled="true"
android:text="Saqlash" />

</FrameLayout>

0 comments on commit 8445c9a

Please sign in to comment.