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
24b7b728
Commit
24b7b728
authored
Sep 03, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emojicon size corrected.
parent
967435a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
EmojiconEditText.java
...java/github/ankushsachdeva/emojicon/EmojiconEditText.java
+2
-4
EmojiconHandler.java
.../java/github/ankushsachdeva/emojicon/EmojiconHandler.java
+7
-3
EmojiconTextView.java
...java/github/ankushsachdeva/emojicon/EmojiconTextView.java
+2
-4
No files found.
app/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconEditText.java
View file @
24b7b728
...
...
@@ -16,8 +16,6 @@
package
github
.
ankushsachdeva
.
emojicon
;
import
github.ankushsachdeva.emojicon.R
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.util.AttributeSet
;
...
...
@@ -31,7 +29,7 @@ public class EmojiconEditText extends EditText {
public
EmojiconEditText
(
Context
context
)
{
super
(
context
);
mEmojiconSize
=
(
int
)
getTextSize
();
mEmojiconSize
=
getLineHeight
();
}
...
...
@@ -47,7 +45,7 @@ public class EmojiconEditText extends EditText {
private
void
init
(
AttributeSet
attrs
)
{
TypedArray
a
=
getContext
().
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
Emojicon
);
mEmojiconSize
=
(
int
)
a
.
getDimension
(
R
.
styleable
.
Emojicon_emojiconSize
,
get
TextSize
());
mEmojiconSize
=
(
int
)
a
.
getDimension
(
R
.
styleable
.
Emojicon_emojiconSize
,
get
LineHeight
());
a
.
recycle
();
setText
(
getText
());
}
...
...
app/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconHandler.java
View file @
24b7b728
...
...
@@ -15,10 +15,11 @@
*/
package
github
.
ankushsachdeva
.
emojicon
;
import
github.ankushsachdeva.emojicon.R
;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.text.Spannable
;
import
android.text.style.DynamicDrawableSpan
;
import
android.text.style.ImageSpan
;
import
android.util.SparseIntArray
;
/**
...
...
@@ -1508,7 +1509,10 @@ public final class EmojiconHandler {
}
if
(
icon
>
0
)
{
text
.
setSpan
(
new
EmojiconSpan
(
context
,
icon
,
emojiSize
),
i
,
i
+
skip
,
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
Drawable
myIcon
=
context
.
getResources
().
getDrawable
(
icon
);
myIcon
.
setBounds
(
0
,
0
,
emojiSize
,
emojiSize
);
text
.
setSpan
(
new
ImageSpan
(
myIcon
,
DynamicDrawableSpan
.
ALIGN_BOTTOM
),
i
,
i
+
skip
,
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
}
}
}
...
...
app/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconTextView.java
View file @
24b7b728
...
...
@@ -16,8 +16,6 @@
package
github
.
ankushsachdeva
.
emojicon
;
import
github.ankushsachdeva.emojicon.R
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.text.SpannableStringBuilder
;
...
...
@@ -49,10 +47,10 @@ public class EmojiconTextView extends TextView {
private
void
init
(
AttributeSet
attrs
)
{
if
(
attrs
==
null
)
{
mEmojiconSize
=
(
int
)
getTextSize
();
mEmojiconSize
=
getLineHeight
();
}
else
{
TypedArray
a
=
getContext
().
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
Emojicon
);
mEmojiconSize
=
(
int
)
a
.
getDimension
(
R
.
styleable
.
Emojicon_emojiconSize
,
get
TextSize
());
mEmojiconSize
=
(
int
)
a
.
getDimension
(
R
.
styleable
.
Emojicon_emojiconSize
,
get
LineHeight
());
mTextStart
=
a
.
getInteger
(
R
.
styleable
.
Emojicon_emojiconTextStart
,
0
);
mTextLength
=
a
.
getInteger
(
R
.
styleable
.
Emojicon_emojiconTextLength
,
-
1
);
a
.
recycle
();
...
...
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