Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shunchaki
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shohboz Qoraboev
shunchaki
Commits
c848c636
Commit
c848c636
authored
Dec 27, 2021
by
shohboz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UPD]
MUS-155
Feature, updated clickabel text and offline
parent
5101f34d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
32 additions
and
13 deletions
+32
-13
MainActivity.kt
app/src/main/java/com/mobiuz/app/dev/MainActivity.kt
+3
-3
LoginFragment.kt
...in/java/com/mobiuz/app/dev/ui/auth/login/LoginFragment.kt
+1
-1
CONSTANTS.kt
app/src/main/java/com/mobiuz/app/dev/ui/global/CONSTANTS.kt
+1
-1
HomeFragment.kt
app/src/main/java/com/mobiuz/app/dev/ui/home/HomeFragment.kt
+21
-2
activity_main.xml
app/src/main/res/layout/activity_main.xml
+1
-1
layout_home_header.xml
app/src/main/res/layout/layout_home_header.xml
+1
-1
layout_offline_bottom_sheet.xml
app/src/main/res/layout/layout_offline_bottom_sheet.xml
+1
-1
strings.xml
app/src/main/res/values-en/strings.xml
+1
-1
strings.xml
app/src/main/res/values-ru/strings.xml
+1
-1
strings.xml
app/src/main/res/values-uz/strings.xml
+1
-1
No files found.
app/src/main/java/com/mobiuz/app/dev/MainActivity.kt
View file @
c848c636
...
@@ -94,9 +94,9 @@ class MainActivity : AppCompatActivity() {
...
@@ -94,9 +94,9 @@ class MainActivity : AppCompatActivity() {
}
}
if
(
intent
?.
action
==
CONSTANTS
.
MY_CONNECTIVITY_CHANGE
){
if
(
intent
?.
action
==
CONSTANTS
.
MY_CONNECTIVITY_CHANGE
){
type
=
NetworkUtil
.
getConnectivityStatus
(
this
@MainActivity
)
type
=
NetworkUtil
.
getConnectivityStatus
(
this
@MainActivity
)
bn
.
btnTryAgain
.
isVisible
=
(
type
==
0
)
&&
(
currentNavController
?.
value
?.
currentDestination
?.
id
!=
R
.
id
.
pinFragment
)
// bn.btnTryAgain.isVisible =
if
(
type
==
0
)
{
if
(
(
type
==
0
)
&&
(
currentNavController
?.
value
?.
currentDestination
?.
id
!=
R
.
id
.
pinFragment
)
)
{
show
Message
(
getString
(
R
.
string
.
not_internet_connect
)
)
show
OfflineBottomSheetDialog
(
)
}
}
}
}
}
}
...
...
app/src/main/java/com/mobiuz/app/dev/ui/auth/login/LoginFragment.kt
View file @
c848c636
...
@@ -63,7 +63,7 @@ class LoginFragment : BaseFragment(R.layout.fragment_login) {
...
@@ -63,7 +63,7 @@ class LoginFragment : BaseFragment(R.layout.fragment_login) {
bn
.
viewGroup
.
hideKeyboard
()
bn
.
viewGroup
.
hideKeyboard
()
}
}
})
})
txtHelperMobiuz
.
makeLinks
(
Pair
(
"www.mobi.uz"
,
View
.
OnClickListener
{
txtHelperMobiuz
.
makeLinks
(
Pair
(
CONSTANTS
.
HTTP_MOBI_UZ
,
View
.
OnClickListener
{
val
uri
=
Uri
.
parse
(
CONSTANTS
.
HTTP_MOBI_UZ
)
val
uri
=
Uri
.
parse
(
CONSTANTS
.
HTTP_MOBI_UZ
)
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
)
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
)
intent
.
data
=
uri
intent
.
data
=
uri
...
...
app/src/main/java/com/mobiuz/app/dev/ui/global/CONSTANTS.kt
View file @
c848c636
...
@@ -11,7 +11,7 @@ object CONSTANTS {
...
@@ -11,7 +11,7 @@ object CONSTANTS {
// safety data
// safety data
const
val
HELP_BOT
=
"@MobiuzHelpBot"
const
val
HELP_BOT
=
"@MobiuzHelpBot"
const
val
HTTP_MOBI_UZ
=
"https://mobi.uz
/
"
const
val
HTTP_MOBI_UZ
=
"https://mobi.uz"
const
val
FEEDBACK
=
"https://company.mobi.uz/ru/feedback/"
const
val
FEEDBACK
=
"https://company.mobi.uz/ru/feedback/"
const
val
LICENSE_UZ
=
"http://10.160.45.60/uploads/licenses/license_uz.html"
const
val
LICENSE_UZ
=
"http://10.160.45.60/uploads/licenses/license_uz.html"
...
...
app/src/main/java/com/mobiuz/app/dev/ui/home/HomeFragment.kt
View file @
c848c636
...
@@ -26,6 +26,7 @@ import com.mobiuz.app.dev.ui.base.BaseFragment
...
@@ -26,6 +26,7 @@ import com.mobiuz.app.dev.ui.base.BaseFragment
import
com.mobiuz.app.dev.utils.extensions.*
import
com.mobiuz.app.dev.utils.extensions.*
import
dagger.hilt.android.AndroidEntryPoint
import
dagger.hilt.android.AndroidEntryPoint
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.flow.collect
import
kotlinx.coroutines.flow.collect
import
javax.inject.Inject
import
javax.inject.Inject
...
@@ -157,11 +158,11 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
...
@@ -157,11 +158,11 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
viewModel
.
mainIndexUiState
.
collect
{
viewModel
.
mainIndexUiState
.
collect
{
when
(
it
)
{
when
(
it
)
{
is
UiStateObject
.
SUCCESS
->
{
is
UiStateObject
.
SUCCESS
->
{
showProgressDialog
(
false
)
bn
.
lottie
.
isVisible
=
false
bn
.
lottie
.
isVisible
=
false
isFirstProgressing
=
false
isFirstProgressing
=
false
customer
=
it
.
data
customer
=
it
.
data
loadData
()
loadData
()
showProgressDialog
(
false
)
}
}
is
UiStateObject
.
ERROR
->
{
is
UiStateObject
.
ERROR
->
{
isFirstProgressing
=
false
isFirstProgressing
=
false
...
@@ -206,6 +207,8 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
...
@@ -206,6 +207,8 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
try
{
try
{
customer
?.
customer
?.
info
?.
let
{
customer
?.
customer
?.
info
?.
let
{
bn
.
apply
{
bn
.
apply
{
// loadSum(it.balance?.amount?.toDouble(),it.balance?.currency)
txtBalance
.
text
=
"${it.balance?.amount?.toMoneyFormat()} ${it.balance?.currency}"
txtBalance
.
text
=
"${it.balance?.amount?.toMoneyFormat()} ${it.balance?.currency}"
pref
.
userBirthday
=
customer
?.
customer
?.
date_of_birth
?:
""
pref
.
userBirthday
=
customer
?.
customer
?.
date_of_birth
?:
""
it
.
counters
?.
let
{
it
.
counters
?.
let
{
...
@@ -218,7 +221,11 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
...
@@ -218,7 +221,11 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
txtTypeMinut
.
text
=
it
.
SECOND
?.
unit
?:
"min"
txtTypeMinut
.
text
=
it
.
SECOND
?.
unit
?:
"min"
txtTarif
.
text
=
customer
?.
customer
?.
tariff
?.
name
txtTarif
.
text
=
customer
?.
customer
?.
tariff
?.
name
txtSumTariff
.
text
=
getString
(
R
.
string
.
sum_month
,
customer
?.
customer
?.
tariff
?.
total_price
?.
toMoneyFormat
()
?:
"0"
)
val
total_price
=
customer
?.
customer
?.
tariff
?.
total_price
?:
0
if
(
total_price
>
0
){
txtSumTariff
.
text
=
getString
(
R
.
string
.
sum_month
,
total_price
.
toMoneyFormat
())
}
txtTarifTo
.
text
=
customer
?.
customer
?.
tariff
?.
next_tariffication_date
txtTarifTo
.
text
=
customer
?.
customer
?.
tariff
?.
next_tariffication_date
txtCountSms
.
text
=
it
.
ITEM
?.
value
?.
toMoneyFormat
()
?:
"0"
txtCountSms
.
text
=
it
.
ITEM
?.
value
?.
toMoneyFormat
()
?:
"0"
...
@@ -232,6 +239,18 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
...
@@ -232,6 +239,18 @@ class HomeFragment : BaseFragment(R.layout.fragment_home) {
}
}
}
}
private
fun
loadSum
(
amount
:
Double
?,
currency
:
String
?){
lifecycleScope
.
launchWhenCreated
{
var
i
=
0.0
while
(
i
<
amount
?:
0.0
){
delay
(
50
)
i
+=
10000
bn
.
txtBalance
.
text
=
"${i.toMoneyFormat()} $currency"
}
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
mainViewModel
.
bottomSheet
(
true
)
mainViewModel
.
bottomSheet
(
true
)
...
...
app/src/main/res/layout/activity_main.xml
View file @
c848c636
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingVertical=
"16dp"
android:paddingVertical=
"16dp"
android:paddingStart=
"30dp"
android:paddingStart=
"30dp"
android:paddingEnd=
"1
0
dp"
>
android:paddingEnd=
"1
6
dp"
>
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/layout_home_header.xml
View file @
c848c636
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:id=
"@+id/txt_profile"
android:id=
"@+id/txt_profile"
android:text=
"
Профиль
"
android:text=
"
@string/profile
"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:textSize=
"14sp"
android:textSize=
"14sp"
android:textColor=
"@color/primary100"
android:textColor=
"@color/primary100"
...
...
app/src/main/res/layout/layout_offline_bottom_sheet.xml
View file @
c848c636
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:gravity=
"center"
android:gravity=
"center"
android:textStyle=
"bold"
android:textStyle=
"bold"
android:background=
"
?android:selectableItemBackground
"
android:background=
"
@drawable/edit_text_bgn
"
android:layout_marginHorizontal=
"24dp"
android:layout_marginHorizontal=
"24dp"
android:layout_marginBottom=
"@dimen/_16sdp"
android:layout_marginBottom=
"@dimen/_16sdp"
android:paddingVertical=
"12dp"
android:paddingVertical=
"12dp"
...
...
app/src/main/res/values-en/strings.xml
View file @
c848c636
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<string
name=
"yes"
>
Yes
</string>
<string
name=
"yes"
>
Yes
</string>
<string
name=
"successfully"
>
Successfully
</string>
<string
name=
"successfully"
>
Successfully
</string>
<string
name=
"ok"
>
Ok
</string>
<string
name=
"ok"
>
Ok
</string>
<string
name=
"helper_mobiuz"
>
T
o enter, you can use the password from the Internet assistant www.
mobi.uz
</string>
<string
name=
"helper_mobiuz"
>
T
he set password will also be applicable in the Internet assistant https://
mobi.uz
</string>
<string
name=
"error_data"
>
Error
</string>
<string
name=
"error_data"
>
Error
</string>
<string
name=
"password_successfully_updated"
>
Password successfully updated
</string>
<string
name=
"password_successfully_updated"
>
Password successfully updated
</string>
<string
name=
"enter_from_finger_or_face"
>
Fingerprint or Face ID login
</string>
<string
name=
"enter_from_finger_or_face"
>
Fingerprint or Face ID login
</string>
...
...
app/src/main/res/values-ru/strings.xml
View file @
c848c636
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<string
name=
"yes"
>
Да
</string>
<string
name=
"yes"
>
Да
</string>
<string
name=
"successfully"
>
Успешно
</string>
<string
name=
"successfully"
>
Успешно
</string>
<string
name=
"ok"
>
Ok
</string>
<string
name=
"ok"
>
Ok
</string>
<string
name=
"helper_mobiuz"
>
Для входа вы можете использовать пароль от интернет-помощника www.
mobi.uz
</string>
<string
name=
"helper_mobiuz"
>
Установленный пароль так же будет применим в интернет-помощнике https://
mobi.uz
</string>
<string
name=
"error_data"
>
Ошибка
</string>
<string
name=
"error_data"
>
Ошибка
</string>
<string
name=
"password_successfully_updated"
>
Пароль успешно обновлен
</string>
<string
name=
"password_successfully_updated"
>
Пароль успешно обновлен
</string>
<string
name=
"enter_from_finger_or_face"
>
Вход в приложение по отпечатку пальца или лицу
</string>
<string
name=
"enter_from_finger_or_face"
>
Вход в приложение по отпечатку пальца или лицу
</string>
...
...
app/src/main/res/values-uz/strings.xml
View file @
c848c636
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<string
name=
"yes"
>
Ha
</string>
<string
name=
"yes"
>
Ha
</string>
<string
name=
"successfully"
>
Muvaffaqiyatli bajarildi
</string>
<string
name=
"successfully"
>
Muvaffaqiyatli bajarildi
</string>
<string
name=
"ok"
>
Ok
</string>
<string
name=
"ok"
>
Ok
</string>
<string
name=
"helper_mobiuz"
>
Kirish uchun www.mobi.uz internet yordamchisi parolidan foydalanishingiz mumkin
</string>
<string
name=
"helper_mobiuz"
>
Belgilangan parol https://mobi.uz Internet-assistentida ham amal qiladi
</string>
<string
name=
"error_data"
>
Xato
</string>
<string
name=
"error_data"
>
Xato
</string>
<string
name=
"password_successfully_updated"
>
Parol muvaffaqiyatli yangilandi
</string>
<string
name=
"password_successfully_updated"
>
Parol muvaffaqiyatli yangilandi
</string>
<string
name=
"enter_from_finger_or_face"
>
Barmoq izi yoki Face ID orqali ilovaga kirish
</string>
<string
name=
"enter_from_finger_or_face"
>
Barmoq izi yoki Face ID orqali ilovaga kirish
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment