Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apk
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
apk
Commits
288fceeb
Commit
288fceeb
authored
Oct 15, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI improvements
parent
2f23635e
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
906 additions
and
1058 deletions
+906
-1058
MessageObject.java
...roj/src/main/java/org/telegram/android/MessageObject.java
+37
-29
FileLoader.java
...Proj/src/main/java/org/telegram/messenger/FileLoader.java
+24
-12
BaseCell.java
...gesProj/src/main/java/org/telegram/ui/Cells/BaseCell.java
+58
-0
ChatActionCell.java
...j/src/main/java/org/telegram/ui/Cells/ChatActionCell.java
+188
-45
ChatBaseCell.java
...roj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
+12
-56
ChatContactCell.java
.../src/main/java/org/telegram/ui/Cells/ChatContactCell.java
+271
-0
ChatMediaCell.java
...oj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java
+5
-1
ChatActivity.java
...sagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+278
-668
LaunchActivity.java
...gesProj/src/main/java/org/telegram/ui/LaunchActivity.java
+5
-6
HorizontalListView.java
...c/main/java/org/telegram/ui/Views/HorizontalListView.java
+4
-4
MessageActionLayout.java
.../main/java/org/telegram/ui/Views/MessageActionLayout.java
+0
-42
TightTextView.java
...oj/src/main/java/org/telegram/ui/Views/TightTextView.java
+0
-118
URLSpanNoUnderline.java
...c/main/java/org/telegram/ui/Views/URLSpanNoUnderline.java
+24
-0
chat_action_change_photo_layout.xml
...j/src/main/res/layout/chat_action_change_photo_layout.xml
+0
-42
chat_action_message_layout.xml
...esProj/src/main/res/layout/chat_action_message_layout.xml
+0
-35
No files found.
TMessagesProj/src/main/java/org/telegram/android/MessageObject.java
View file @
288fceeb
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java
View file @
288fceeb
...
...
@@ -564,18 +564,30 @@ public class FileLoader {
if
(
message
==
null
)
{
return
new
File
(
""
);
}
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaVideo
)
{
return
getPathToAttach
(
message
.
media
.
video
);
}
else
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaDocument
)
{
return
getPathToAttach
(
message
.
media
.
document
);
}
else
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaAudio
)
{
return
getPathToAttach
(
message
.
media
.
audio
);
}
else
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaPhoto
)
{
ArrayList
<
TLRPC
.
PhotoSize
>
sizes
=
message
.
media
.
photo
.
sizes
;
if
(
sizes
.
size
()
>
0
)
{
TLRPC
.
PhotoSize
sizeFull
=
getClosestPhotoSizeWithSize
(
sizes
,
AndroidUtilities
.
getPhotoSize
());
if
(
sizeFull
!=
null
)
{
return
getPathToAttach
(
sizeFull
);
if
(
message
instanceof
TLRPC
.
TL_messageService
)
{
if
(
message
.
action
.
photo
!=
null
)
{
ArrayList
<
TLRPC
.
PhotoSize
>
sizes
=
message
.
action
.
photo
.
sizes
;
if
(
sizes
.
size
()
>
0
)
{
TLRPC
.
PhotoSize
sizeFull
=
getClosestPhotoSizeWithSize
(
sizes
,
AndroidUtilities
.
getPhotoSize
());
if
(
sizeFull
!=
null
)
{
return
getPathToAttach
(
sizeFull
);
}
}
}
}
else
{
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaVideo
)
{
return
getPathToAttach
(
message
.
media
.
video
);
}
else
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaDocument
)
{
return
getPathToAttach
(
message
.
media
.
document
);
}
else
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaAudio
)
{
return
getPathToAttach
(
message
.
media
.
audio
);
}
else
if
(
message
.
media
instanceof
TLRPC
.
TL_messageMediaPhoto
)
{
ArrayList
<
TLRPC
.
PhotoSize
>
sizes
=
message
.
media
.
photo
.
sizes
;
if
(
sizes
.
size
()
>
0
)
{
TLRPC
.
PhotoSize
sizeFull
=
getClosestPhotoSizeWithSize
(
sizes
,
AndroidUtilities
.
getPhotoSize
());
if
(
sizeFull
!=
null
)
{
return
getPathToAttach
(
sizeFull
);
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/Cells/BaseCell.java
View file @
288fceeb
...
...
@@ -10,10 +10,43 @@ package org.telegram.ui.Cells;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.view.HapticFeedbackConstants
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.ViewConfiguration
;
public
class
BaseCell
extends
View
{
private
final
class
CheckForTap
implements
Runnable
{
public
void
run
()
{
if
(
pendingCheckForLongPress
==
null
)
{
pendingCheckForLongPress
=
new
CheckForLongPress
();
}
pendingCheckForLongPress
.
currentPressCount
=
++
pressCount
;
postDelayed
(
pendingCheckForLongPress
,
ViewConfiguration
.
getLongPressTimeout
()
-
ViewConfiguration
.
getTapTimeout
());
}
}
class
CheckForLongPress
implements
Runnable
{
public
int
currentPressCount
;
public
void
run
()
{
if
(
checkingForLongPress
&&
getParent
()
!=
null
&&
currentPressCount
==
pressCount
)
{
checkingForLongPress
=
false
;
MotionEvent
event
=
MotionEvent
.
obtain
(
0
,
0
,
MotionEvent
.
ACTION_CANCEL
,
0
,
0
,
0
);
onTouchEvent
(
event
);
event
.
recycle
();
performHapticFeedback
(
HapticFeedbackConstants
.
LONG_PRESS
);
onLongPress
();
}
}
}
private
boolean
checkingForLongPress
=
false
;
private
CheckForLongPress
pendingCheckForLongPress
=
null
;
private
int
pressCount
=
0
;
private
CheckForTap
pendingCheckForTap
=
null
;
public
BaseCell
(
Context
context
)
{
super
(
context
);
}
...
...
@@ -25,4 +58,29 @@ public class BaseCell extends View {
protected
void
setDrawableBounds
(
Drawable
drawable
,
int
x
,
int
y
,
int
w
,
int
h
)
{
drawable
.
setBounds
(
x
,
y
,
x
+
w
,
y
+
h
);
}
protected
void
startCheckLongPress
()
{
if
(
checkingForLongPress
)
{
return
;
}
checkingForLongPress
=
true
;
if
(
pendingCheckForTap
==
null
)
{
pendingCheckForTap
=
new
CheckForTap
();
}
postDelayed
(
pendingCheckForTap
,
ViewConfiguration
.
getTapTimeout
());
}
protected
void
cancelCheckLongPress
()
{
checkingForLongPress
=
false
;
if
(
pendingCheckForLongPress
!=
null
)
{
removeCallbacks
(
pendingCheckForLongPress
);
}
if
(
pendingCheckForTap
!=
null
)
{
removeCallbacks
(
pendingCheckForTap
);
}
}
protected
void
onLongPress
()
{
}
}
TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatActionCell.java
View file @
288fceeb
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java
View file @
288fceeb
...
...
@@ -17,10 +17,8 @@ import android.text.Layout;
import
android.text.StaticLayout
;
import
android.text.TextPaint
;
import
android.text.TextUtils
;
import
android.view.HapticFeedbackConstants
;
import
android.view.MotionEvent
;
import
android.view.SoundEffectConstants
;
import
android.view.ViewConfiguration
;
import
org.telegram.android.AndroidUtilities
;
import
org.telegram.android.ContactsController
;
...
...
@@ -108,45 +106,13 @@ public class ChatBaseCell extends BaseCell {
private
TLRPC
.
User
currentForwardUser
;
private
String
currentForwardNameString
;
p
ublic
ChatBaseCellDelegate
delegate
;
p
rotected
ChatBaseCellDelegate
delegate
;
protected
int
namesOffset
=
0
;
private
boolean
checkingForLongPress
=
false
;
private
int
pressCount
=
0
;
private
CheckForLongPress
pendingCheckForLongPress
=
null
;
private
CheckForTap
pendingCheckForTap
=
null
;
private
int
last_send_state
=
0
;
private
int
last_delete_date
=
0
;
private
final
class
CheckForTap
implements
Runnable
{
public
void
run
()
{
if
(
pendingCheckForLongPress
==
null
)
{
pendingCheckForLongPress
=
new
CheckForLongPress
();
}
pendingCheckForLongPress
.
currentPressCount
=
++
pressCount
;
postDelayed
(
pendingCheckForLongPress
,
ViewConfiguration
.
getLongPressTimeout
()
-
ViewConfiguration
.
getTapTimeout
());
}
}
class
CheckForLongPress
implements
Runnable
{
public
int
currentPressCount
;
public
void
run
()
{
if
(
checkingForLongPress
&&
getParent
()
!=
null
&&
currentPressCount
==
pressCount
)
{
if
(
delegate
!=
null
)
{
checkingForLongPress
=
false
;
MotionEvent
event
=
MotionEvent
.
obtain
(
0
,
0
,
MotionEvent
.
ACTION_CANCEL
,
0
,
0
,
0
);
onTouchEvent
(
event
);
event
.
recycle
();
performHapticFeedback
(
HapticFeedbackConstants
.
LONG_PRESS
);
delegate
.
didLongPressed
(
ChatBaseCell
.
this
);
}
}
}
}
public
ChatBaseCell
(
Context
context
)
{
super
(
context
);
if
(
backgroundDrawableIn
==
null
)
{
...
...
@@ -203,6 +169,10 @@ public class ChatBaseCell extends BaseCell {
invalidate
();
}
public
void
setDelegate
(
ChatBaseCellDelegate
delegate
)
{
this
.
delegate
=
delegate
;
}
public
void
setCheckPressed
(
boolean
value
,
boolean
pressed
)
{
isCheckPressed
=
value
;
isPressed
=
pressed
;
...
...
@@ -345,27 +315,6 @@ public class ChatBaseCell extends BaseCell {
return
backgroundWidth
-
AndroidUtilities
.
dp
(
8
);
}
protected
void
startCheckLongPress
()
{
if
(
checkingForLongPress
)
{
return
;
}
checkingForLongPress
=
true
;
if
(
pendingCheckForTap
==
null
)
{
pendingCheckForTap
=
new
CheckForTap
();
}
postDelayed
(
pendingCheckForTap
,
ViewConfiguration
.
getTapTimeout
());
}
protected
void
cancelCheckLongPress
()
{
checkingForLongPress
=
false
;
if
(
pendingCheckForLongPress
!=
null
)
{
removeCallbacks
(
pendingCheckForLongPress
);
}
if
(
pendingCheckForTap
!=
null
)
{
removeCallbacks
(
pendingCheckForTap
);
}
}
@Override
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
boolean
result
=
false
;
...
...
@@ -462,6 +411,13 @@ public class ChatBaseCell extends BaseCell {
}
@Override
protected
void
onLongPress
()
{
if
(
delegate
!=
null
)
{
delegate
.
didLongPressed
(
this
);
}
}
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
if
(
currentMessageObject
==
null
)
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatContactCell.java
0 → 100644
View file @
288fceeb
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java
View file @
288fceeb
...
...
@@ -93,7 +93,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
private
int
nameWidth
=
0
;
private
String
currentNameString
;
p
ublic
ChatMediaCellDelegate
mediaDelegate
=
null
;
p
rivate
ChatMediaCellDelegate
mediaDelegate
=
null
;
private
float
currentProgress
=
0
;
private
RectF
progressRect
=
new
RectF
();
...
...
@@ -165,6 +165,10 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
}
}
public
void
setMediaDelegate
(
ChatMediaCellDelegate
delegate
)
{
this
.
mediaDelegate
=
delegate
;
}
@Override
protected
void
onDetachedFromWindow
()
{
super
.
onDetachedFromWindow
();
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
View file @
288fceeb
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
View file @
288fceeb
...
...
@@ -661,12 +661,11 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
actionBarLayout
.
presentFragment
(
fragment
,
false
,
true
,
true
);
}
Bundle
args2
=
new
Bundle
();
args2
.
putString
(
"videoPath"
,
videoPath
);
VideoEditorActivity
fragment2
=
new
VideoEditorActivity
(
args2
);
fragment2
.
setDelegate
(
fragment
);
presentFragment
(
fragment2
,
true
,
true
);
if
(!
AndroidUtilities
.
isTablet
())
{
if
(!
fragment
.
openVideoEditor
(
videoPath
,
true
,
actionBarLayout
))
{
if
(!
AndroidUtilities
.
isTablet
())
{
actionBarLayout
.
presentFragment
(
fragment
,
true
);
}
}
else
if
(!
AndroidUtilities
.
isTablet
())
{
actionBarLayout
.
addFragmentToStack
(
fragment
,
actionBarLayout
.
fragmentsStack
.
size
()
-
1
);
}
}
else
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/HorizontalListView.java
View file @
288fceeb
...
...
@@ -207,7 +207,7 @@ public class HorizontalListView extends AdapterView<ListAdapter> {
v
=
list
.
poll
();
}
View
child
=
mAdapter
.
getView
(
mRightViewIndex
,
v
,
this
);
child
.
setTag
(
1
,
type
);
child
.
setTag
(
type
);
addAndMeasureChild
(
child
,
-
1
);
rightEdge
+=
child
.
getMeasuredWidth
();
...
...
@@ -234,7 +234,7 @@ public class HorizontalListView extends AdapterView<ListAdapter> {
v
=
list
.
poll
();
}
View
child
=
mAdapter
.
getView
(
mLeftViewIndex
,
v
,
this
);
child
.
setTag
(
1
,
type
);
child
.
setTag
(
type
);
addAndMeasureChild
(
child
,
0
);
leftEdge
-=
child
.
getMeasuredWidth
();
...
...
@@ -248,7 +248,7 @@ public class HorizontalListView extends AdapterView<ListAdapter> {
while
(
child
!=
null
&&
child
.
getRight
()
+
dx
<=
0
)
{
mDisplayOffset
+=
child
.
getMeasuredWidth
();
int
type
=
(
Integer
)
child
.
getTag
(
1
);
int
type
=
(
Integer
)
child
.
getTag
();
LinkedList
<
View
>
list
=
mRemovedViewQueue
.
get
(
type
);
if
(
list
==
null
)
{
list
=
new
LinkedList
<
View
>();
...
...
@@ -263,7 +263,7 @@ public class HorizontalListView extends AdapterView<ListAdapter> {
child
=
getChildAt
(
getChildCount
()
-
1
);
while
(
child
!=
null
&&
child
.
getLeft
()
+
dx
>=
getWidth
())
{
int
type
=
(
Integer
)
child
.
getTag
(
1
);
int
type
=
(
Integer
)
child
.
getTag
();
LinkedList
<
View
>
list
=
mRemovedViewQueue
.
get
(
type
);
if
(
list
==
null
)
{
list
=
new
LinkedList
<
View
>();
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/MessageActionLayout.java
deleted
100644 → 0
View file @
2f23635e
/*
* This is the source code of Telegram for Android v. 1.3.2.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013.
*/
package
org
.
telegram
.
ui
.
Views
;
import
android.widget.FrameLayout
;
import
org.telegram.android.AndroidUtilities
;
import
org.telegram.messenger.R
;
public
class
MessageActionLayout
extends
FrameLayout
{
public
TightTextView
messageTextView
;
public
MessageActionLayout
(
android
.
content
.
Context
context
)
{
super
(
context
);
}
public
MessageActionLayout
(
android
.
content
.
Context
context
,
android
.
util
.
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
MessageActionLayout
(
android
.
content
.
Context
context
,
android
.
util
.
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
}
@Override
protected
void
onMeasure
(
int
widthMeasureSpec
,
int
heightMeasureSpec
)
{
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
setMeasuredDimension
(
messageTextView
.
linesMaxWidth
+
AndroidUtilities
.
dp
(
14
),
getMeasuredHeight
());
}
@Override
protected
void
onFinishInflate
()
{
super
.
onFinishInflate
();
messageTextView
=
(
TightTextView
)
findViewById
(
R
.
id
.
chat_message_text
);
}
}
TMessagesProj/src/main/java/org/telegram/ui/Views/TightTextView.java
deleted
100644 → 0
View file @
2f23635e
/*
* This is the source code of Telegram for Android v. 1.3.2.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013.
*/
package
org
.
telegram
.
ui
.
Views
;
import
android.content.Context
;
import
android.text.Layout
;
import
android.util.AttributeSet
;
import
android.widget.TextView
;
import
org.telegram.messenger.FileLog
;
public
class
TightTextView
extends
TextView
{
private
boolean
hasMaxWidth
;
public
int
maxWidth
;
public
int
lastLineWidth
=
0
;
public
int
linesMaxWidth
=
0
;
public
int
lines
=
0
;
public
TightTextView
(
Context
context
)
{
this
(
context
,
null
,
0
);
}
public
TightTextView
(
Context
context
,
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
}
public
TightTextView
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
}
@Override
protected
void
onMeasure
(
int
widthMeasureSpec
,
int
heightMeasureSpec
)
{
try
{
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
int
measuredWidth
=
getMeasuredWidth
();
Layout
layout
=
getLayout
();
lines
=
layout
.
getLineCount
();
float
lastLeft
=
layout
.
getLineLeft
(
lines
-
1
);
float
lastLine
=
layout
.
getLineWidth
(
lines
-
1
);
int
lastLineWidthWithLeft
;
int
linesMaxWidthWithLeft
;
boolean
hasNonRTL
=
false
;
linesMaxWidth
=
lastLineWidth
=
(
int
)
Math
.
ceil
(
lastLine
);
linesMaxWidthWithLeft
=
lastLineWidthWithLeft
=
(
int
)
Math
.
ceil
(
lastLine
+
lastLeft
);
if
(
lastLeft
==
0
)
{
hasNonRTL
=
true
;
}
if
(
hasMaxWidth
)
{
int
specModeW
=
MeasureSpec
.
getMode
(
widthMeasureSpec
);
if
(
specModeW
!=
MeasureSpec
.
EXACTLY
)
{
if
(
lines
>
1
)
{
float
textRealMaxWidth
=
0
,
textRealMaxWidthWithLeft
=
0
;
for
(
int
n
=
0
;
n
<
lines
;
++
n
)
{
float
lineWidth
;
float
lineLeft
;
try
{
lineWidth
=
layout
.
getLineWidth
(
n
);
lineLeft
=
layout
.
getLineLeft
(
n
);
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
return
;
}
if
(
lineLeft
==
0
)
{
hasNonRTL
=
true
;
}
textRealMaxWidth
=
Math
.
max
(
textRealMaxWidth
,
lineWidth
);
textRealMaxWidthWithLeft
=
Math
.
max
(
textRealMaxWidthWithLeft
,
lineWidth
+
lineLeft
);
linesMaxWidth
=
Math
.
max
(
linesMaxWidth
,
(
int
)
Math
.
ceil
(
lineWidth
));
linesMaxWidthWithLeft
=
Math
.
max
(
linesMaxWidthWithLeft
,
(
int
)
Math
.
ceil
(
lineWidth
+
lineLeft
));
}
if
(
hasNonRTL
)
{
textRealMaxWidth
=
textRealMaxWidthWithLeft
;
lastLineWidth
=
lastLineWidthWithLeft
;
linesMaxWidth
=
linesMaxWidthWithLeft
;
}
else
{
lastLineWidth
=
linesMaxWidth
;
}
int
w
=
(
int
)
Math
.
ceil
(
textRealMaxWidth
);
if
(
w
<
getMeasuredWidth
())
{
super
.
onMeasure
(
MeasureSpec
.
makeMeasureSpec
(
w
,
MeasureSpec
.
AT_MOST
),
heightMeasureSpec
);
}
}
else
{
super
.
onMeasure
(
MeasureSpec
.
makeMeasureSpec
(
Math
.
min
(
maxWidth
,
linesMaxWidth
),
MeasureSpec
.
AT_MOST
),
heightMeasureSpec
);
}
}
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
try
{
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
}
catch
(
Exception
e2
)
{
setMeasuredDimension
(
MeasureSpec
.
getSize
(
widthMeasureSpec
),
MeasureSpec
.
getSize
(
heightMeasureSpec
));
FileLog
.
e
(
"tmessages"
,
e2
);
}
}
}
@Override
public
void
setMaxWidth
(
int
maxpixels
)
{
super
.
setMaxWidth
(
maxpixels
);
hasMaxWidth
=
true
;
maxWidth
=
maxpixels
;
}
@Override
public
void
setMaxEms
(
int
maxems
)
{
super
.
setMaxEms
(
maxems
);
hasMaxWidth
=
true
;
}
}
TMessagesProj/src/main/java/org/telegram/ui/Views/URLSpanNoUnderline.java
0 → 100644
View file @
288fceeb
/*
* This is the source code of Telegram for Android v. 1.7.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2014.
*/
package
org
.
telegram
.
ui
.
Views
;
import
android.text.TextPaint
;
import
android.text.style.URLSpan
;
public
class
URLSpanNoUnderline
extends
URLSpan
{
public
URLSpanNoUnderline
(
String
url
)
{
super
(
url
);
}
@Override
public
void
updateDrawState
(
TextPaint
ds
)
{
super
.
updateDrawState
(
ds
);
ds
.
setUnderlineText
(
false
);
}
}
TMessagesProj/src/main/res/layout/chat_action_change_photo_layout.xml
deleted
100644 → 0
View file @
2f23635e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:paddingBottom=
"5dp"
android:gravity=
"center"
android:layout_gravity=
"top"
>
<org.telegram.ui.Views.MessageActionLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:id=
"@+id/message_action_layout"
>
<org.telegram.ui.Views.TightTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"15dp"
android:id=
"@+id/chat_message_text"
android:textColor=
"#ffffff"
android:paddingTop=
"1dp"
android:paddingBottom=
"1dp"
android:ellipsize=
"none"
android:gravity=
"center"
android:maxLines=
"10"
android:maxWidth=
"380dp"
android:layout_gravity=
"center"
/>
</org.telegram.ui.Views.MessageActionLayout>
<org.telegram.ui.Views.BackupImageView
android:layout_width=
"64dp"
android:layout_height=
"64dp"
android:layout_marginTop=
"5dp"
android:id=
"@+id/chat_photo_image"
/>
</LinearLayout>
\ No newline at end of file
TMessagesProj/src/main/res/layout/chat_action_message_layout.xml
deleted
100644 → 0
View file @
2f23635e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingBottom=
"5dp"
android:gravity=
"center"
android:layout_gravity=
"top"
>
<org.telegram.ui.Views.MessageActionLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:id=
"@+id/message_action_layout"
>
<org.telegram.ui.Views.TightTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"14dp"
android:id=
"@+id/chat_message_text"
android:textColor=
"#ffffff"
android:paddingTop=
"1dp"
android:paddingBottom=
"1dp"
android:ellipsize=
"none"
android:gravity=
"center"
android:maxLines=
"10"
android:layout_gravity=
"center"
/>
</org.telegram.ui.Views.MessageActionLayout>
</LinearLayout>
\ 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