Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
Administrator
AloqaIM-Android
Commits
8a0293c7
Commit
8a0293c7
authored
Mar 06, 2019
by
Asel Peiris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct delete account dialog UI Alignment
parent
cf7ffd51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
12 deletions
+35
-12
ProfileFragment.kt
...in/java/chat/rocket/android/profile/ui/ProfileFragment.kt
+7
-12
item_account_delete.xml
app/src/main/res/layout/item_account_delete.xml
+28
-0
No files found.
app/src/main/java/chat/rocket/android/profile/ui/ProfileFragment.kt
View file @
8a0293c7
...
...
@@ -293,19 +293,14 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
}
fun
showDeleteAccountDialog
()
{
val
passwordEditText
=
EditText
(
context
)
passwordEditText
.
hint
=
getString
(
R
.
string
.
msg_password
)
context
?.
let
{
val
builder
=
AlertDialog
.
Builder
(
it
)
builder
.
setTitle
(
R
.
string
.
title_are_you_sure
)
.
setView
(
passwordEditText
)
.
setPositiveButton
(
R
.
string
.
action_delete_account
)
{
_
,
_
->
presenter
.
deleteAccount
(
passwordEditText
.
text
.
toString
())
}
.
setNegativeButton
(
android
.
R
.
string
.
no
)
{
dialog
,
_
->
dialog
.
cancel
()
}
.
create
()
.
show
()
val
passwordEText
=
EditText
(
context
);
val
mDialogView
=
LayoutInflater
.
from
(
it
).
inflate
(
R
.
layout
.
item_account_delete
,
null
)
val
mBuilder
=
AlertDialog
.
Builder
(
it
)
mBuilder
.
setView
(
mDialogView
).
setPositiveButton
(
R
.
string
.
action_delete_account
)
{
_
,
_
->
presenter
.
deleteAccount
(
passwordEText
.
text
.
toString
())
}.
setNegativeButton
(
android
.
R
.
string
.
no
)
{
dialog
,
_
->
dialog
.
cancel
()
}.
create
().
show
()
}
}
}
app/src/main/res/layout/item_account_delete.xml
0 → 100644
View file @
8a0293c7
<?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"
android:padding=
"@dimen/screen_edge_left_and_right_margins"
>
<TextView
android:id=
"@+id/text_reset_password"
style=
"@style/Authentication.TextView.Headline"
android:text=
"@string/title_are_you_sure"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<EditText
android:id=
"@+id/text_delete_account_password"
style=
"@style/Authentication.EditText.Border"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_key_black_20dp"
android:hint=
"@string/msg_password"
android:imeOptions=
"actionDone"
android:inputType=
"textPassword"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/text_reset_password"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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