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
95de265e
Commit
95de265e
authored
Nov 24, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
fdaf4555
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
251 additions
and
21 deletions
+251
-21
build.gradle
TMessagesProj/build.gradle
+2
-2
NotificationsController.java
...in/java/org/telegram/android/NotificationsController.java
+7
-1
ActionBar.java
...oj/src/main/java/org/telegram/ui/ActionBar/ActionBar.java
+20
-0
BaseFragment.java
...src/main/java/org/telegram/ui/ActionBar/BaseFragment.java
+0
-1
ContactsAdapter.java
...c/main/java/org/telegram/ui/Adapters/ContactsAdapter.java
+8
-2
TextDetailDocumentsCell.java
...n/java/org/telegram/ui/Cells/TextDetailDocumentsCell.java
+21
-0
ChatActivity.java
...sagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+2
-2
ContactsActivity.java
...sProj/src/main/java/org/telegram/ui/ContactsActivity.java
+8
-0
DocumentSelectActivity.java
...src/main/java/org/telegram/ui/DocumentSelectActivity.java
+151
-5
GroupCreateActivity.java
...oj/src/main/java/org/telegram/ui/GroupCreateActivity.java
+3
-0
MessagesActivity.java
...sProj/src/main/java/org/telegram/ui/MessagesActivity.java
+4
-0
ProfileActivity.java
...esProj/src/main/java/org/telegram/ui/ProfileActivity.java
+2
-2
ChatActivityEnterView.java
...ain/java/org/telegram/ui/Views/ChatActivityEnterView.java
+1
-0
CheckBox.java
...gesProj/src/main/java/org/telegram/ui/Views/CheckBox.java
+20
-5
Switch.java
...sagesProj/src/main/java/org/telegram/ui/Views/Switch.java
+2
-1
ic_ab_done_gray.png
TMessagesProj/src/main/res/drawable-hdpi/ic_ab_done_gray.png
+0
-0
ic_ab_done_gray.png
TMessagesProj/src/main/res/drawable-mdpi/ic_ab_done_gray.png
+0
-0
ic_ab_done_gray.png
...sagesProj/src/main/res/drawable-xhdpi/ic_ab_done_gray.png
+0
-0
ic_ab_done_gray.png
...agesProj/src/main/res/drawable-xxhdpi/ic_ab_done_gray.png
+0
-0
No files found.
TMessagesProj/build.gradle
View file @
95de265e
...
@@ -80,7 +80,7 @@ android {
...
@@ -80,7 +80,7 @@ android {
defaultConfig
{
defaultConfig
{
minSdkVersion
8
minSdkVersion
8
targetSdkVersion
21
targetSdkVersion
21
versionCode
39
5
versionCode
39
7
versionName
"2.0.
4
"
versionName
"2.0.
5
"
}
}
}
}
TMessagesProj/src/main/java/org/telegram/android/NotificationsController.java
View file @
95de265e
...
@@ -425,7 +425,9 @@ public class NotificationsController {
...
@@ -425,7 +425,9 @@ public class NotificationsController {
}
}
mBuilder
.
setCategory
(
NotificationCompat
.
CATEGORY_MESSAGE
);
mBuilder
.
setCategory
(
NotificationCompat
.
CATEGORY_MESSAGE
);
mBuilder
.
setVisibility
(
NotificationCompat
.
VISIBILITY_PUBLIC
);
if
(
chat
==
null
&&
user
!=
null
&&
user
.
phone
!=
null
&&
user
.
phone
.
length
()
>
0
)
{
mBuilder
.
addPerson
(
"tel:+"
+
user
.
phone
);
}
/*Bundle bundle = new Bundle();
/*Bundle bundle = new Bundle();
bundle.putString(NotificationCompat.EXTRA_PEOPLE, );
bundle.putString(NotificationCompat.EXTRA_PEOPLE, );
mBuilder.setExtras()*/
mBuilder.setExtras()*/
...
@@ -636,6 +638,10 @@ public class NotificationsController {
...
@@ -636,6 +638,10 @@ public class NotificationsController {
.
extend
(
new
NotificationCompat
.
WearableExtender
().
addAction
(
action
))
.
extend
(
new
NotificationCompat
.
WearableExtender
().
addAction
(
action
))
.
setCategory
(
NotificationCompat
.
CATEGORY_MESSAGE
);
.
setCategory
(
NotificationCompat
.
CATEGORY_MESSAGE
);
if
(
chat
==
null
&&
user
!=
null
&&
user
.
phone
!=
null
&&
user
.
phone
.
length
()
>
0
)
{
builder
.
addPerson
(
"tel:+"
+
user
.
phone
);
}
notificationManager
.
notify
(
notificationId
,
builder
.
build
());
notificationManager
.
notify
(
notificationId
,
builder
.
build
());
wearNoticationsIds
.
put
(
dialog_id
,
notificationId
);
wearNoticationsIds
.
put
(
dialog_id
,
notificationId
);
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBar.java
View file @
95de265e
...
@@ -40,6 +40,7 @@ public class ActionBar extends FrameLayout {
...
@@ -40,6 +40,7 @@ public class ActionBar extends FrameLayout {
private
ImageView
backButtonImageView
;
private
ImageView
backButtonImageView
;
private
TextView
titleTextView
;
private
TextView
titleTextView
;
private
TextView
subTitleTextView
;
private
TextView
subTitleTextView
;
private
View
actionModeTop
;
private
ActionBarMenu
menu
;
private
ActionBarMenu
menu
;
private
ActionBarMenu
actionMode
;
private
ActionBarMenu
actionMode
;
private
boolean
occupyStatusBar
=
Build
.
VERSION
.
SDK_INT
>=
21
;
private
boolean
occupyStatusBar
=
Build
.
VERSION
.
SDK_INT
>=
21
;
...
@@ -343,6 +344,19 @@ public class ActionBar extends FrameLayout {
...
@@ -343,6 +344,19 @@ public class ActionBar extends FrameLayout {
layoutParams
.
gravity
=
Gravity
.
RIGHT
;
layoutParams
.
gravity
=
Gravity
.
RIGHT
;
actionMode
.
setLayoutParams
(
layoutParams
);
actionMode
.
setLayoutParams
(
layoutParams
);
actionMode
.
setVisibility
(
GONE
);
actionMode
.
setVisibility
(
GONE
);
if
(
occupyStatusBar
)
{
actionModeTop
=
new
View
(
getContext
());
actionModeTop
.
setBackgroundColor
(
0x99000000
);
addView
(
actionModeTop
);
layoutParams
=
(
FrameLayout
.
LayoutParams
)
actionModeTop
.
getLayoutParams
();
layoutParams
.
height
=
AndroidUtilities
.
statusBarHeight
;
layoutParams
.
width
=
LayoutParams
.
FILL_PARENT
;
layoutParams
.
gravity
=
Gravity
.
TOP
|
Gravity
.
LEFT
;
actionModeTop
.
setLayoutParams
(
layoutParams
);
actionModeTop
.
setVisibility
(
GONE
);
}
return
actionMode
;
return
actionMode
;
}
}
...
@@ -351,6 +365,9 @@ public class ActionBar extends FrameLayout {
...
@@ -351,6 +365,9 @@ public class ActionBar extends FrameLayout {
return
;
return
;
}
}
actionMode
.
setVisibility
(
VISIBLE
);
actionMode
.
setVisibility
(
VISIBLE
);
if
(
actionModeTop
!=
null
)
{
actionModeTop
.
setVisibility
(
VISIBLE
);
}
if
(
titleFrameLayout
!=
null
)
{
if
(
titleFrameLayout
!=
null
)
{
titleFrameLayout
.
setVisibility
(
INVISIBLE
);
titleFrameLayout
.
setVisibility
(
INVISIBLE
);
}
}
...
@@ -364,6 +381,9 @@ public class ActionBar extends FrameLayout {
...
@@ -364,6 +381,9 @@ public class ActionBar extends FrameLayout {
return
;
return
;
}
}
actionMode
.
setVisibility
(
GONE
);
actionMode
.
setVisibility
(
GONE
);
if
(
actionModeTop
!=
null
)
{
actionModeTop
.
setVisibility
(
GONE
);
}
if
(
titleFrameLayout
!=
null
)
{
if
(
titleFrameLayout
!=
null
)
{
titleFrameLayout
.
setVisibility
(
VISIBLE
);
titleFrameLayout
.
setVisibility
(
VISIBLE
);
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/ActionBar/BaseFragment.java
View file @
95de265e
...
@@ -119,7 +119,6 @@ public class BaseFragment {
...
@@ -119,7 +119,6 @@ public class BaseFragment {
public
void
onPause
()
{
public
void
onPause
()
{
if
(
actionBar
!=
null
)
{
if
(
actionBar
!=
null
)
{
actionBar
.
onPause
();
actionBar
.
onPause
();
actionBar
.
closeSearchField
();
}
}
try
{
try
{
if
(
visibleDialog
!=
null
&&
visibleDialog
.
isShowing
())
{
if
(
visibleDialog
!=
null
&&
visibleDialog
.
isShowing
())
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsAdapter.java
View file @
95de265e
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
package
org
.
telegram
.
ui
.
Adapters
;
package
org
.
telegram
.
ui
.
Adapters
;
import
android.content.Context
;
import
android.content.Context
;
import
android.os.Build
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -35,6 +36,7 @@ public class ContactsAdapter extends BaseSectionsAdapter {
...
@@ -35,6 +36,7 @@ public class ContactsAdapter extends BaseSectionsAdapter {
private
boolean
needPhonebook
;
private
boolean
needPhonebook
;
private
HashMap
<
Integer
,
TLRPC
.
User
>
ignoreUsers
;
private
HashMap
<
Integer
,
TLRPC
.
User
>
ignoreUsers
;
private
HashMap
<
Integer
,
?>
checkedMap
;
private
HashMap
<
Integer
,
?>
checkedMap
;
private
boolean
scrolling
;
public
ContactsAdapter
(
Context
context
,
boolean
arg1
,
boolean
arg2
,
HashMap
<
Integer
,
TLRPC
.
User
>
arg3
)
{
public
ContactsAdapter
(
Context
context
,
boolean
arg1
,
boolean
arg2
,
HashMap
<
Integer
,
TLRPC
.
User
>
arg3
)
{
mContext
=
context
;
mContext
=
context
;
...
@@ -47,6 +49,10 @@ public class ContactsAdapter extends BaseSectionsAdapter {
...
@@ -47,6 +49,10 @@ public class ContactsAdapter extends BaseSectionsAdapter {
checkedMap
=
map
;
checkedMap
=
map
;
}
}
public
void
setIsScrolling
(
boolean
value
)
{
scrolling
=
value
;
}
@Override
@Override
public
Object
getItem
(
int
section
,
int
position
)
{
public
Object
getItem
(
int
section
,
int
position
)
{
if
(
onlyUsers
)
{
if
(
onlyUsers
)
{
...
@@ -175,7 +181,7 @@ public class ContactsAdapter extends BaseSectionsAdapter {
...
@@ -175,7 +181,7 @@ public class ContactsAdapter extends BaseSectionsAdapter {
if
(
type
==
4
)
{
if
(
type
==
4
)
{
if
(
convertView
==
null
)
{
if
(
convertView
==
null
)
{
convertView
=
new
DividerCell
(
mContext
);
convertView
=
new
DividerCell
(
mContext
);
convertView
.
setPadding
(
AndroidUtilities
.
dp
(
LocaleController
.
isRTL
?
2
4
:
72
),
0
,
AndroidUtilities
.
dp
(
LocaleController
.
isRTL
?
72
:
24
),
0
);
convertView
.
setPadding
(
AndroidUtilities
.
dp
(
LocaleController
.
isRTL
?
2
8
:
72
),
0
,
AndroidUtilities
.
dp
(
LocaleController
.
isRTL
?
72
:
28
),
0
);
}
}
}
else
if
(
type
==
3
)
{
}
else
if
(
type
==
3
)
{
if
(
convertView
==
null
)
{
if
(
convertView
==
null
)
{
...
@@ -220,7 +226,7 @@ public class ContactsAdapter extends BaseSectionsAdapter {
...
@@ -220,7 +226,7 @@ public class ContactsAdapter extends BaseSectionsAdapter {
TLRPC
.
User
user
=
MessagesController
.
getInstance
().
getUser
(
arr
.
get
(
position
).
user_id
);
TLRPC
.
User
user
=
MessagesController
.
getInstance
().
getUser
(
arr
.
get
(
position
).
user_id
);
((
UserCell
)
convertView
).
setData
(
user
,
null
,
null
,
0
);
((
UserCell
)
convertView
).
setData
(
user
,
null
,
null
,
0
);
if
(
checkedMap
!=
null
)
{
if
(
checkedMap
!=
null
)
{
((
UserCell
)
convertView
).
setChecked
(
checkedMap
.
containsKey
(
user
.
id
),
false
);
((
UserCell
)
convertView
).
setChecked
(
checkedMap
.
containsKey
(
user
.
id
),
!
scrolling
&&
Build
.
VERSION
.
SDK_INT
>
10
);
}
}
if
(
ignoreUsers
!=
null
)
{
if
(
ignoreUsers
!=
null
)
{
if
(
ignoreUsers
.
containsKey
(
user
.
id
))
{
if
(
ignoreUsers
.
containsKey
(
user
.
id
))
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/Cells/TextDetailDocumentsCell.java
View file @
95de265e
...
@@ -19,6 +19,7 @@ import android.widget.TextView;
...
@@ -19,6 +19,7 @@ import android.widget.TextView;
import
org.telegram.android.AndroidUtilities
;
import
org.telegram.android.AndroidUtilities
;
import
org.telegram.android.LocaleController
;
import
org.telegram.android.LocaleController
;
import
org.telegram.ui.Views.BackupImageView
;
import
org.telegram.ui.Views.BackupImageView
;
import
org.telegram.ui.Views.CheckBox
;
public
class
TextDetailDocumentsCell
extends
FrameLayout
{
public
class
TextDetailDocumentsCell
extends
FrameLayout
{
...
@@ -26,6 +27,7 @@ public class TextDetailDocumentsCell extends FrameLayout {
...
@@ -26,6 +27,7 @@ public class TextDetailDocumentsCell extends FrameLayout {
private
TextView
valueTextView
;
private
TextView
valueTextView
;
private
TextView
typeTextView
;
private
TextView
typeTextView
;
private
BackupImageView
imageView
;
private
BackupImageView
imageView
;
private
CheckBox
checkBox
;
public
TextDetailDocumentsCell
(
Context
context
)
{
public
TextDetailDocumentsCell
(
Context
context
)
{
super
(
context
);
super
(
context
);
...
@@ -90,6 +92,18 @@ public class TextDetailDocumentsCell extends FrameLayout {
...
@@ -90,6 +92,18 @@ public class TextDetailDocumentsCell extends FrameLayout {
layoutParams
.
rightMargin
=
AndroidUtilities
.
dp
(
LocaleController
.
isRTL
?
16
:
0
);
layoutParams
.
rightMargin
=
AndroidUtilities
.
dp
(
LocaleController
.
isRTL
?
16
:
0
);
layoutParams
.
gravity
=
(
LocaleController
.
isRTL
?
Gravity
.
RIGHT
:
Gravity
.
LEFT
)
|
Gravity
.
CENTER_VERTICAL
;
layoutParams
.
gravity
=
(
LocaleController
.
isRTL
?
Gravity
.
RIGHT
:
Gravity
.
LEFT
)
|
Gravity
.
CENTER_VERTICAL
;
imageView
.
setLayoutParams
(
layoutParams
);
imageView
.
setLayoutParams
(
layoutParams
);
checkBox
=
new
CheckBox
(
context
);
checkBox
.
setVisibility
(
GONE
);
addView
(
checkBox
);
layoutParams
=
(
LayoutParams
)
checkBox
.
getLayoutParams
();
layoutParams
.
width
=
AndroidUtilities
.
dp
(
22
);
layoutParams
.
height
=
AndroidUtilities
.
dp
(
22
);
layoutParams
.
topMargin
=
AndroidUtilities
.
dp
(
34
);
layoutParams
.
leftMargin
=
LocaleController
.
isRTL
?
0
:
AndroidUtilities
.
dp
(
38
);
layoutParams
.
rightMargin
=
LocaleController
.
isRTL
?
AndroidUtilities
.
dp
(
38
)
:
0
;
layoutParams
.
gravity
=
(
LocaleController
.
isRTL
?
Gravity
.
RIGHT
:
Gravity
.
LEFT
);
checkBox
.
setLayoutParams
(
layoutParams
);
}
}
@Override
@Override
...
@@ -117,4 +131,11 @@ public class TextDetailDocumentsCell extends FrameLayout {
...
@@ -117,4 +131,11 @@ public class TextDetailDocumentsCell extends FrameLayout {
imageView
.
setVisibility
(
GONE
);
imageView
.
setVisibility
(
GONE
);
}
}
}
}
public
void
setChecked
(
boolean
checked
,
boolean
animated
)
{
if
(
checkBox
.
getVisibility
()
!=
VISIBLE
)
{
checkBox
.
setVisibility
(
VISIBLE
);
}
checkBox
.
setChecked
(
checked
,
animated
);
}
}
}
TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
View file @
95de265e
...
@@ -572,9 +572,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
...
@@ -572,9 +572,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
DocumentSelectActivity
fragment
=
new
DocumentSelectActivity
();
DocumentSelectActivity
fragment
=
new
DocumentSelectActivity
();
fragment
.
setDelegate
(
new
DocumentSelectActivity
.
DocumentSelectActivityDelegate
()
{
fragment
.
setDelegate
(
new
DocumentSelectActivity
.
DocumentSelectActivityDelegate
()
{
@Override
@Override
public
void
didSelectFile
(
DocumentSelectActivity
activity
,
String
path
)
{
public
void
didSelectFile
s
(
DocumentSelectActivity
activity
,
ArrayList
<
String
>
files
)
{
activity
.
finishFragment
();
activity
.
finishFragment
();
SendMessagesHelper
.
prepareSendingDocument
(
path
,
path
,
null
,
null
,
dialog_id
);
SendMessagesHelper
.
prepareSendingDocument
s
(
files
,
files
,
null
,
null
,
dialog_id
);
}
}
@Override
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/ContactsActivity.java
View file @
95de265e
...
@@ -440,6 +440,14 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -440,6 +440,14 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
}
}
}
}
@Override
public
void
onPause
()
{
super
.
onPause
();
if
(
actionBar
!=
null
)
{
actionBar
.
closeSearchField
();
}
}
@Override
@Override
public
void
didReceivedNotification
(
int
id
,
Object
...
args
)
{
public
void
didReceivedNotification
(
int
id
,
Object
...
args
)
{
if
(
id
==
NotificationCenter
.
contactsDidLoaded
)
{
if
(
id
==
NotificationCenter
.
contactsDidLoaded
)
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/DocumentSelectActivity.java
View file @
95de265e
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/java/org/telegram/ui/GroupCreateActivity.java
View file @
95de265e
...
@@ -455,6 +455,9 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
...
@@ -455,6 +455,9 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
if
(
i
==
SCROLL_STATE_TOUCH_SCROLL
)
{
if
(
i
==
SCROLL_STATE_TOUCH_SCROLL
)
{
AndroidUtilities
.
hideKeyboard
(
userSelectEditText
);
AndroidUtilities
.
hideKeyboard
(
userSelectEditText
);
}
}
if
(
listViewAdapter
!=
null
)
{
listViewAdapter
.
setIsScrolling
(
i
!=
SCROLL_STATE_IDLE
);
}
}
}
@Override
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/MessagesActivity.java
View file @
95de265e
...
@@ -362,6 +362,10 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -362,6 +362,10 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
}
}
if
(
message_id
!=
0
)
{
if
(
message_id
!=
0
)
{
args
.
putInt
(
"message_id"
,
message_id
);
args
.
putInt
(
"message_id"
,
message_id
);
}
else
{
if
(
actionBar
!=
null
)
{
actionBar
.
closeSearchField
();
}
}
}
if
(
AndroidUtilities
.
isTablet
())
{
if
(
AndroidUtilities
.
isTablet
())
{
if
(
openedDialogId
==
dialog_id
)
{
if
(
openedDialogId
==
dialog_id
)
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
View file @
95de265e
...
@@ -485,10 +485,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
...
@@ -485,10 +485,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
}
else
if
(
i
==
1
)
{
}
else
if
(
i
==
1
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
android
.
os
.
Build
.
VERSION_CODES
.
HONEYCOMB
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
android
.
os
.
Build
.
VERSION_CODES
.
HONEYCOMB
)
{
android
.
text
.
ClipboardManager
clipboard
=
(
android
.
text
.
ClipboardManager
)
ApplicationLoader
.
applicationContext
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
android
.
text
.
ClipboardManager
clipboard
=
(
android
.
text
.
ClipboardManager
)
ApplicationLoader
.
applicationContext
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
clipboard
.
setText
(
user
.
phone
);
clipboard
.
setText
(
"+"
+
user
.
phone
);
}
else
{
}
else
{
android
.
content
.
ClipboardManager
clipboard
=
(
android
.
content
.
ClipboardManager
)
ApplicationLoader
.
applicationContext
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
android
.
content
.
ClipboardManager
clipboard
=
(
android
.
content
.
ClipboardManager
)
ApplicationLoader
.
applicationContext
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
android
.
content
.
ClipData
clip
=
android
.
content
.
ClipData
.
newPlainText
(
"label"
,
user
.
phone
);
android
.
content
.
ClipData
clip
=
android
.
content
.
ClipData
.
newPlainText
(
"label"
,
"+"
+
user
.
phone
);
clipboard
.
setPrimaryClip
(
clip
);
clipboard
.
setPrimaryClip
(
clip
);
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/ChatActivityEnterView.java
View file @
95de265e
...
@@ -148,6 +148,7 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
...
@@ -148,6 +148,7 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
ViewProxy
.
setScaleX
(
sendButton
,
0.1f
);
ViewProxy
.
setScaleX
(
sendButton
,
0.1f
);
ViewProxy
.
setScaleY
(
sendButton
,
0.1f
);
ViewProxy
.
setScaleY
(
sendButton
,
0.1f
);
ViewProxy
.
setAlpha
(
sendButton
,
0.0f
);
ViewProxy
.
setAlpha
(
sendButton
,
0.0f
);
sendButton
.
clearAnimation
();
emojiButton
=
(
ImageView
)
containerView
.
findViewById
(
R
.
id
.
chat_smile_button
);
emojiButton
=
(
ImageView
)
containerView
.
findViewById
(
R
.
id
.
chat_smile_button
);
audioSendButton
=
(
ImageButton
)
containerView
.
findViewById
(
R
.
id
.
chat_audio_send_button
);
audioSendButton
=
(
ImageButton
)
containerView
.
findViewById
(
R
.
id
.
chat_audio_send_button
);
recordPanel
=
containerView
.
findViewById
(
R
.
id
.
record_panel
);
recordPanel
=
containerView
.
findViewById
(
R
.
id
.
record_panel
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/CheckBox.java
View file @
95de265e
...
@@ -58,13 +58,23 @@ public class CheckBox extends View {
...
@@ -58,13 +58,23 @@ public class CheckBox extends View {
eraser2
.
setStrokeWidth
(
AndroidUtilities
.
dp
(
28
));
eraser2
.
setStrokeWidth
(
AndroidUtilities
.
dp
(
28
));
eraser2
.
setXfermode
(
new
PorterDuffXfermode
(
PorterDuff
.
Mode
.
CLEAR
));
eraser2
.
setXfermode
(
new
PorterDuffXfermode
(
PorterDuff
.
Mode
.
CLEAR
));
}
}
}
@Override
public
void
setVisibility
(
int
visibility
)
{
super
.
setVisibility
(
visibility
);
if
(
visibility
==
VISIBLE
&&
drawBitmap
==
null
)
{
drawBitmap
=
Bitmap
.
createBitmap
(
AndroidUtilities
.
dp
(
22
),
AndroidUtilities
.
dp
(
22
),
Bitmap
.
Config
.
ARGB_4444
);
drawBitmap
=
Bitmap
.
createBitmap
(
AndroidUtilities
.
dp
(
22
),
AndroidUtilities
.
dp
(
22
),
Bitmap
.
Config
.
ARGB_4444
);
bitmapCanvas
=
new
Canvas
(
drawBitmap
);
bitmapCanvas
=
new
Canvas
(
drawBitmap
);
checkBitmap
=
Bitmap
.
createBitmap
(
AndroidUtilities
.
dp
(
22
),
AndroidUtilities
.
dp
(
22
),
Bitmap
.
Config
.
ARGB_4444
);
checkBitmap
=
Bitmap
.
createBitmap
(
AndroidUtilities
.
dp
(
22
),
AndroidUtilities
.
dp
(
22
),
Bitmap
.
Config
.
ARGB_4444
);
checkCanvas
=
new
Canvas
(
checkBitmap
);
checkCanvas
=
new
Canvas
(
checkBitmap
);
}
}
}
public
void
setProgress
(
float
value
)
{
public
void
setProgress
(
float
value
)
{
if
(
progress
==
value
)
{
return
;
}
progress
=
value
;
progress
=
value
;
invalidate
();
invalidate
();
}
}
...
@@ -104,8 +114,10 @@ public class CheckBox extends View {
...
@@ -104,8 +114,10 @@ public class CheckBox extends View {
}
}
public
void
setChecked
(
boolean
checked
,
boolean
animated
)
{
public
void
setChecked
(
boolean
checked
,
boolean
animated
)
{
if
(
checked
==
isChecked
)
{
return
;
}
isChecked
=
checked
;
isChecked
=
checked
;
invalidate
();
if
(
attachedToWindow
&&
animated
)
{
if
(
attachedToWindow
&&
animated
)
{
animateToCheckedState
(
checked
);
animateToCheckedState
(
checked
);
...
@@ -121,6 +133,9 @@ public class CheckBox extends View {
...
@@ -121,6 +133,9 @@ public class CheckBox extends View {
@Override
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
protected
void
onDraw
(
Canvas
canvas
)
{
if
(
getVisibility
()
!=
VISIBLE
)
{
return
;
}
if
(
progress
!=
0
)
{
if
(
progress
!=
0
)
{
drawBitmap
.
eraseColor
(
0
);
drawBitmap
.
eraseColor
(
0
);
float
rad
=
getMeasuredWidth
()
/
2
;
float
rad
=
getMeasuredWidth
()
/
2
;
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/Switch.java
View file @
95de265e
...
@@ -23,6 +23,7 @@ import android.graphics.PorterDuffColorFilter;
...
@@ -23,6 +23,7 @@ import android.graphics.PorterDuffColorFilter;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
import
android.graphics.Region
;
import
android.graphics.Region
;
import
android.graphics.drawable.Drawable
;
import
android.graphics.drawable.Drawable
;
import
android.os.Build
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.MotionEvent
;
import
android.view.MotionEvent
;
import
android.view.VelocityTracker
;
import
android.view.VelocityTracker
;
...
@@ -532,7 +533,7 @@ public class Switch extends CompoundButton {
...
@@ -532,7 +533,7 @@ public class Switch extends CompoundButton {
mThumbDrawable
.
setBounds
(
thumbLeft
,
switchTop
+
offset
,
thumbRight
,
switchBottom
+
offset
);
mThumbDrawable
.
setBounds
(
thumbLeft
,
switchTop
+
offset
,
thumbRight
,
switchBottom
+
offset
);
final
Drawable
background
=
getBackground
();
final
Drawable
background
=
getBackground
();
if
(
background
!=
null
)
{
if
(
background
!=
null
&&
Build
.
VERSION
.
SDK_INT
>=
21
)
{
background
.
setHotspotBounds
(
thumbLeft
,
switchTop
,
thumbRight
,
switchBottom
);
background
.
setHotspotBounds
(
thumbLeft
,
switchTop
,
thumbRight
,
switchBottom
);
}
}
}
}
...
...
TMessagesProj/src/main/res/drawable-hdpi/ic_ab_done_gray.png
0 → 100755
View file @
95de265e
1.15 KB
TMessagesProj/src/main/res/drawable-mdpi/ic_ab_done_gray.png
0 → 100755
View file @
95de265e
1.05 KB
TMessagesProj/src/main/res/drawable-xhdpi/ic_ab_done_gray.png
0 → 100755
View file @
95de265e
1.2 KB
TMessagesProj/src/main/res/drawable-xxhdpi/ic_ab_done_gray.png
0 → 100755
View file @
95de265e
1.36 KB
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