Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-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
xabber-android
Commits
9b305a5f
Commit
9b305a5f
authored
Sep 03, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Security button moved to the right and get hidden during typing.
parent
24b7b728
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+6
-2
chat_viewer_fragment.xml
app/src/main/res/layout/chat_viewer_fragment.xml
+10
-11
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
9b305a5f
...
...
@@ -210,7 +210,8 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
@Override
public
void
afterTextChanged
(
Editable
text
)
{
setSendButtonColor
();
setUpInputViewButtons
();
if
(!
skipOnTextChanges
)
{
ChatStateManager
.
getInstance
().
onComposing
(
account
,
user
,
text
);
...
...
@@ -367,7 +368,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
popup
.
show
();
}
private
void
set
SendButtonColor
()
{
private
void
set
UpInputViewButtons
()
{
boolean
empty
=
inputView
.
getText
().
toString
().
trim
().
isEmpty
();
if
(
empty
!=
isInputEmpty
)
{
...
...
@@ -375,14 +376,17 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
if
(
isInputEmpty
)
{
sendButton
.
setImageResource
(
R
.
drawable
.
ic_button_send_inactive_24dp
);
securityButton
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
sendButton
.
setImageResource
(
R
.
drawable
.
ic_button_send
);
sendButton
.
setImageLevel
(
AccountManager
.
getInstance
().
getColorLevel
(
account
));
securityButton
.
setVisibility
(
View
.
GONE
);
}
}
}
public
void
restoreInputState
()
{
skipOnTextChanges
=
true
;
...
...
app/src/main/res/layout/chat_viewer_fragment.xml
View file @
9b305a5f
...
...
@@ -63,17 +63,6 @@
android:orientation=
"horizontal"
>
<ImageButton
android:id=
"@+id/button_security"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@drawable/ripple_background"
android:contentDescription=
"@string/otr_encryption"
android:padding=
"8dp"
android:src=
"@drawable/ic_security_grey_24dp"
/>
<ImageButton
android:id=
"@+id/button_emoticon"
android:layout_width=
"wrap_content"
...
...
@@ -108,6 +97,16 @@
android:scrollbars=
"vertical"
/>
<ImageButton
android:id=
"@+id/button_security"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/ripple_background"
android:contentDescription=
"@string/otr_encryption"
android:padding=
"8dp"
android:src=
"@drawable/ic_security_grey_24dp"
/>
<ImageButton
android:id=
"@+id/button_send_message"
android:layout_width=
"wrap_content"
...
...
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