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
ea8760f9
Commit
ea8760f9
authored
Nov 19, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
77f23954
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
43 deletions
+35
-43
build.gradle
TMessagesProj/build.gradle
+1
-1
TextCheckCell.java
...oj/src/main/java/org/telegram/ui/Cells/TextCheckCell.java
+4
-1
NotificationsSettingsActivity.java
...n/java/org/telegram/ui/NotificationsSettingsActivity.java
+11
-20
ProfileActivity.java
...esProj/src/main/java/org/telegram/ui/ProfileActivity.java
+7
-5
SettingsActivity.java
...sProj/src/main/java/org/telegram/ui/SettingsActivity.java
+6
-6
chat_layout.xml
TMessagesProj/src/main/res/layout/chat_layout.xml
+3
-5
popup_notification_layout.xml
...gesProj/src/main/res/layout/popup_notification_layout.xml
+3
-5
No files found.
TMessagesProj/build.gradle
View file @
ea8760f9
...
@@ -80,7 +80,7 @@ android {
...
@@ -80,7 +80,7 @@ android {
defaultConfig
{
defaultConfig
{
minSdkVersion
8
minSdkVersion
8
targetSdkVersion
21
targetSdkVersion
21
versionCode
38
4
versionCode
38
6
versionName
"2.0.0"
versionName
"2.0.0"
}
}
}
}
TMessagesProj/src/main/java/org/telegram/ui/Cells/TextCheckCell.java
View file @
ea8760f9
...
@@ -13,7 +13,6 @@ import android.graphics.Canvas;
...
@@ -13,7 +13,6 @@ import android.graphics.Canvas;
import
android.graphics.Paint
;
import
android.graphics.Paint
;
import
android.util.TypedValue
;
import
android.util.TypedValue
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.widget.FrameLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
org.telegram.android.AndroidUtilities
;
import
org.telegram.android.AndroidUtilities
;
...
@@ -80,6 +79,10 @@ public class TextCheckCell extends FrameLayoutFixed {
...
@@ -80,6 +79,10 @@ public class TextCheckCell extends FrameLayoutFixed {
setWillNotDraw
(!
divider
);
setWillNotDraw
(!
divider
);
}
}
public
void
setChecked
(
boolean
checked
)
{
checkBox
.
setChecked
(
checked
);
}
@Override
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
protected
void
onDraw
(
Canvas
canvas
)
{
if
(
needDivider
)
{
if
(
needDivider
)
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/NotificationsSettingsActivity.java
View file @
ea8760f9
...
@@ -45,7 +45,6 @@ import org.telegram.ui.Cells.TextColorCell;
...
@@ -45,7 +45,6 @@ import org.telegram.ui.Cells.TextColorCell;
import
org.telegram.ui.Cells.TextDetailSettingsCell
;
import
org.telegram.ui.Cells.TextDetailSettingsCell
;
import
org.telegram.ui.ActionBar.ActionBar
;
import
org.telegram.ui.ActionBar.ActionBar
;
import
org.telegram.ui.ActionBar.BaseFragment
;
import
org.telegram.ui.ActionBar.BaseFragment
;
import
org.telegram.ui.Views.AvatarDrawable
;
import
org.telegram.ui.Views.ColorPickerView
;
import
org.telegram.ui.Views.ColorPickerView
;
public
class
NotificationsSettingsActivity
extends
BaseFragment
implements
NotificationCenter
.
NotificationCenterDelegate
{
public
class
NotificationsSettingsActivity
extends
BaseFragment
implements
NotificationCenter
.
NotificationCenterDelegate
{
...
@@ -154,7 +153,6 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
...
@@ -154,7 +153,6 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
listView
.
setDivider
(
null
);
listView
.
setDivider
(
null
);
listView
.
setDividerHeight
(
0
);
listView
.
setDividerHeight
(
0
);
listView
.
setVerticalScrollBarEnabled
(
false
);
listView
.
setVerticalScrollBarEnabled
(
false
);
AndroidUtilities
.
setListViewEdgeEffectColor
(
listView
,
AvatarDrawable
.
getProfileBackColorForId
(
5
));
frameLayout
.
addView
(
listView
);
frameLayout
.
addView
(
listView
);
FrameLayout
.
LayoutParams
layoutParams
=
(
FrameLayout
.
LayoutParams
)
listView
.
getLayoutParams
();
FrameLayout
.
LayoutParams
layoutParams
=
(
FrameLayout
.
LayoutParams
)
listView
.
getLayoutParams
();
layoutParams
.
width
=
FrameLayout
.
LayoutParams
.
MATCH_PARENT
;
layoutParams
.
width
=
FrameLayout
.
LayoutParams
.
MATCH_PARENT
;
...
@@ -164,10 +162,10 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
...
@@ -164,10 +162,10 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
listView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
listView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
AdapterView
<?>
adapterView
,
View
view
,
final
int
i
,
long
l
)
{
public
void
onItemClick
(
AdapterView
<?>
adapterView
,
View
view
,
final
int
i
,
long
l
)
{
boolean
enabled
=
false
;
if
(
i
==
messageAlertRow
||
i
==
groupAlertRow
)
{
if
(
i
==
messageAlertRow
||
i
==
groupAlertRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
;
if
(
i
==
messageAlertRow
)
{
if
(
i
==
messageAlertRow
)
{
enabled
=
preferences
.
getBoolean
(
"EnableAll"
,
true
);
enabled
=
preferences
.
getBoolean
(
"EnableAll"
,
true
);
editor
.
putBoolean
(
"EnableAll"
,
!
enabled
);
editor
.
putBoolean
(
"EnableAll"
,
!
enabled
);
...
@@ -176,12 +174,10 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
...
@@ -176,12 +174,10 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
editor
.
putBoolean
(
"EnableGroup"
,
!
enabled
);
editor
.
putBoolean
(
"EnableGroup"
,
!
enabled
);
}
}
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
updateServerNotificationsSettings
(
i
==
groupAlertRow
);
updateServerNotificationsSettings
(
i
==
groupAlertRow
);
}
else
if
(
i
==
messagePreviewRow
||
i
==
groupPreviewRow
)
{
}
else
if
(
i
==
messagePreviewRow
||
i
==
groupPreviewRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
;
if
(
i
==
messagePreviewRow
)
{
if
(
i
==
messagePreviewRow
)
{
enabled
=
preferences
.
getBoolean
(
"EnablePreviewAll"
,
true
);
enabled
=
preferences
.
getBoolean
(
"EnablePreviewAll"
,
true
);
editor
.
putBoolean
(
"EnablePreviewAll"
,
!
enabled
);
editor
.
putBoolean
(
"EnablePreviewAll"
,
!
enabled
);
...
@@ -190,7 +186,6 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
...
@@ -190,7 +186,6 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
editor
.
putBoolean
(
"EnablePreviewGroup"
,
!
enabled
);
editor
.
putBoolean
(
"EnablePreviewGroup"
,
!
enabled
);
}
}
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
updateServerNotificationsSettings
(
i
==
groupPreviewRow
);
updateServerNotificationsSettings
(
i
==
groupPreviewRow
);
}
else
if
(
i
==
messageSoundRow
||
i
==
groupSoundRow
)
{
}
else
if
(
i
==
messageSoundRow
||
i
==
groupSoundRow
)
{
try
{
try
{
...
@@ -263,55 +258,48 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
...
@@ -263,55 +258,48 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
}
else
if
(
i
==
inappSoundRow
)
{
}
else
if
(
i
==
inappSoundRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
=
preferences
.
getBoolean
(
"EnableInAppSounds"
,
true
);
enabled
=
preferences
.
getBoolean
(
"EnableInAppSounds"
,
true
);
editor
.
putBoolean
(
"EnableInAppSounds"
,
!
enabled
);
editor
.
putBoolean
(
"EnableInAppSounds"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
}
else
if
(
i
==
inappVibrateRow
)
{
}
else
if
(
i
==
inappVibrateRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
=
preferences
.
getBoolean
(
"EnableInAppVibrate"
,
true
);
enabled
=
preferences
.
getBoolean
(
"EnableInAppVibrate"
,
true
);
editor
.
putBoolean
(
"EnableInAppVibrate"
,
!
enabled
);
editor
.
putBoolean
(
"EnableInAppVibrate"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
}
else
if
(
i
==
inappPreviewRow
)
{
}
else
if
(
i
==
inappPreviewRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
=
preferences
.
getBoolean
(
"EnableInAppPreview"
,
true
);
enabled
=
preferences
.
getBoolean
(
"EnableInAppPreview"
,
true
);
editor
.
putBoolean
(
"EnableInAppPreview"
,
!
enabled
);
editor
.
putBoolean
(
"EnableInAppPreview"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
}
else
if
(
i
==
contactJoinedRow
)
{
}
else
if
(
i
==
contactJoinedRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
=
preferences
.
getBoolean
(
"EnableContactJoined"
,
true
);
enabled
=
preferences
.
getBoolean
(
"EnableContactJoined"
,
true
);
MessagesController
.
getInstance
().
enableJoined
=
!
enabled
;
MessagesController
.
getInstance
().
enableJoined
=
!
enabled
;
editor
.
putBoolean
(
"EnableContactJoined"
,
!
enabled
);
editor
.
putBoolean
(
"EnableContactJoined"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
}
else
if
(
i
==
pebbleAlertRow
)
{
}
else
if
(
i
==
pebbleAlertRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
=
preferences
.
getBoolean
(
"EnablePebbleNotifications"
,
false
);
enabled
=
preferences
.
getBoolean
(
"EnablePebbleNotifications"
,
false
);
editor
.
putBoolean
(
"EnablePebbleNotifications"
,
!
enabled
);
editor
.
putBoolean
(
"EnablePebbleNotifications"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
}
else
if
(
i
==
badgeNumberRow
)
{
}
else
if
(
i
==
badgeNumberRow
)
{
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
boolean
enabled
=
preferences
.
getBoolean
(
"badgeNumber"
,
true
);
enabled
=
preferences
.
getBoolean
(
"badgeNumber"
,
true
);
editor
.
putBoolean
(
"badgeNumber"
,
!
enabled
);
editor
.
putBoolean
(
"badgeNumber"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
NotificationsController
.
getInstance
().
setBadgeEnabled
(!
enabled
);
NotificationsController
.
getInstance
().
setBadgeEnabled
(!
enabled
);
}
else
if
(
i
==
notificationsServiceRow
)
{
}
else
if
(
i
==
notificationsServiceRow
)
{
final
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
final
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"Notifications"
,
Activity
.
MODE_PRIVATE
);
boolean
enabled
=
preferences
.
getBoolean
(
"pushService"
,
true
);
enabled
=
preferences
.
getBoolean
(
"pushService"
,
true
);
if
(!
enabled
)
{
if
(!
enabled
)
{
final
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
final
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
editor
.
putBoolean
(
"pushService"
,
!
enabled
);
editor
.
putBoolean
(
"pushService"
,
!
enabled
);
editor
.
commit
();
editor
.
commit
();
listView
.
invalidateViews
();
ApplicationLoader
.
startPushService
();
ApplicationLoader
.
startPushService
();
}
else
{
}
else
{
if
(
getParentActivity
()
==
null
)
{
if
(
getParentActivity
()
==
null
)
{
...
@@ -442,6 +430,9 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
...
@@ -442,6 +430,9 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
builder
.
setNegativeButton
(
LocaleController
.
getString
(
"Cancel"
,
R
.
string
.
Cancel
),
null
);
builder
.
setNegativeButton
(
LocaleController
.
getString
(
"Cancel"
,
R
.
string
.
Cancel
),
null
);
showAlertDialog
(
builder
);
showAlertDialog
(
builder
);
}
}
if
(
view
instanceof
TextCheckCell
)
{
((
TextCheckCell
)
view
).
setChecked
(!
enabled
);
}
}
}
});
});
}
else
{
}
else
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
View file @
ea8760f9
...
@@ -219,8 +219,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
...
@@ -219,8 +219,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
@Override
@Override
public
View
createView
(
LayoutInflater
inflater
,
ViewGroup
container
)
{
public
View
createView
(
LayoutInflater
inflater
,
ViewGroup
container
)
{
if
(
fragmentView
==
null
)
{
if
(
fragmentView
==
null
)
{
actionBar
.
setBackgroundColor
(
AvatarDrawable
.
getProfileBackColorForId
(
user_id
!=
0
?
user_id
:
chat_id
));
actionBar
.
setBackgroundColor
(
AvatarDrawable
.
getProfileBackColorForId
(
user_id
!=
0
?
5
:
chat_id
));
actionBar
.
setItemsBackground
(
AvatarDrawable
.
getButtonColorForId
(
user_id
!=
0
?
user_id
:
chat_id
));
actionBar
.
setItemsBackground
(
AvatarDrawable
.
getButtonColorForId
(
user_id
!=
0
?
5
:
chat_id
));
actionBar
.
setBackButtonImage
(
R
.
drawable
.
ic_ab_back
);
actionBar
.
setBackButtonImage
(
R
.
drawable
.
ic_ab_back
);
actionBar
.
setExtraHeight
(
AndroidUtilities
.
dp
(
88
),
false
);
actionBar
.
setExtraHeight
(
AndroidUtilities
.
dp
(
88
),
false
);
if
(
AndroidUtilities
.
isTablet
())
{
if
(
AndroidUtilities
.
isTablet
())
{
...
@@ -390,7 +390,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
...
@@ -390,7 +390,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
nameTextView
.
setLayoutParams
(
layoutParams
);
nameTextView
.
setLayoutParams
(
layoutParams
);
onlineTextView
=
new
TextView
(
getParentActivity
());
onlineTextView
=
new
TextView
(
getParentActivity
());
onlineTextView
.
setTextColor
(
AvatarDrawable
.
getProfileTextColorForId
(
user_id
!=
0
?
user_id
:
chat_id
));
onlineTextView
.
setTextColor
(
AvatarDrawable
.
getProfileTextColorForId
(
user_id
!=
0
?
5
:
chat_id
));
onlineTextView
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_DIP
,
14
);
onlineTextView
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_DIP
,
14
);
onlineTextView
.
setLines
(
1
);
onlineTextView
.
setLines
(
1
);
onlineTextView
.
setMaxLines
(
1
);
onlineTextView
.
setMaxLines
(
1
);
...
@@ -411,7 +411,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
...
@@ -411,7 +411,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
listView
.
setDivider
(
null
);
listView
.
setDivider
(
null
);
listView
.
setDividerHeight
(
0
);
listView
.
setDividerHeight
(
0
);
listView
.
setVerticalScrollBarEnabled
(
false
);
listView
.
setVerticalScrollBarEnabled
(
false
);
AndroidUtilities
.
setListViewEdgeEffectColor
(
listView
,
AvatarDrawable
.
getProfileBackColorForId
(
user_id
!=
0
?
user_id
:
chat_id
));
AndroidUtilities
.
setListViewEdgeEffectColor
(
listView
,
AvatarDrawable
.
getProfileBackColorForId
(
user_id
!=
0
?
5
:
chat_id
));
frameLayout
.
addView
(
listView
);
frameLayout
.
addView
(
listView
);
layoutParams
=
(
FrameLayout
.
LayoutParams
)
listView
.
getLayoutParams
();
layoutParams
=
(
FrameLayout
.
LayoutParams
)
listView
.
getLayoutParams
();
layoutParams
.
width
=
FrameLayout
.
LayoutParams
.
MATCH_PARENT
;
layoutParams
.
width
=
FrameLayout
.
LayoutParams
.
MATCH_PARENT
;
...
@@ -1042,7 +1042,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
...
@@ -1042,7 +1042,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
photo
=
user
.
photo
.
photo_small
;
photo
=
user
.
photo
.
photo_small
;
photoBig
=
user
.
photo
.
photo_big
;
photoBig
=
user
.
photo
.
photo_big
;
}
}
avatarImage
.
setImage
(
photo
,
"50_50"
,
new
AvatarDrawable
(
user
,
true
));
AvatarDrawable
avatarDrawable
=
new
AvatarDrawable
(
user
,
true
);
avatarDrawable
.
setColor
(
0xff5c98cd
);
avatarImage
.
setImage
(
photo
,
"50_50"
,
avatarDrawable
);
nameTextView
.
setText
(
ContactsController
.
formatName
(
user
.
first_name
,
user
.
last_name
));
nameTextView
.
setText
(
ContactsController
.
formatName
(
user
.
first_name
,
user
.
last_name
));
onlineTextView
.
setText
(
LocaleController
.
formatUserStatus
(
user
));
onlineTextView
.
setText
(
LocaleController
.
formatUserStatus
(
user
));
...
...
TMessagesProj/src/main/java/org/telegram/ui/SettingsActivity.java
View file @
ea8760f9
...
@@ -417,8 +417,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -417,8 +417,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
editor
.
putBoolean
(
"view_animations"
,
!
animations
);
editor
.
putBoolean
(
"view_animations"
,
!
animations
);
editor
.
commit
();
editor
.
commit
();
if
(
listView
!=
nu
ll
)
{
if
(
view
instanceof
TextCheckCe
ll
)
{
listView
.
invalidateViews
(
);
((
TextCheckCell
)
view
).
setChecked
(!
animations
);
}
}
}
else
if
(
i
==
notificationRow
)
{
}
else
if
(
i
==
notificationRow
)
{
presentFragment
(
new
NotificationsSettingsActivity
());
presentFragment
(
new
NotificationsSettingsActivity
());
...
@@ -454,13 +454,13 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -454,13 +454,13 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
editor
.
putBoolean
(
"send_by_enter"
,
!
send
);
editor
.
putBoolean
(
"send_by_enter"
,
!
send
);
editor
.
commit
();
editor
.
commit
();
if
(
listView
!=
nu
ll
)
{
if
(
view
instanceof
TextCheckCe
ll
)
{
listView
.
invalidateViews
(
);
((
TextCheckCell
)
view
).
setChecked
(!
send
);
}
}
}
else
if
(
i
==
saveToGalleryRow
)
{
}
else
if
(
i
==
saveToGalleryRow
)
{
MediaController
.
getInstance
().
toggleSaveToGallery
();
MediaController
.
getInstance
().
toggleSaveToGallery
();
if
(
listView
!=
nu
ll
)
{
if
(
view
instanceof
TextCheckCe
ll
)
{
listView
.
invalidateViews
(
);
((
TextCheckCell
)
view
).
setChecked
(
MediaController
.
getInstance
().
canSaveToGallery
()
);
}
}
}
else
if
(
i
==
privacyRow
)
{
}
else
if
(
i
==
privacyRow
)
{
presentFragment
(
new
PrivacySettingsActivity
());
presentFragment
(
new
PrivacySettingsActivity
());
...
...
TMessagesProj/src/main/res/layout/chat_layout.xml
View file @
ea8760f9
...
@@ -108,20 +108,18 @@
...
@@ -108,20 +108,18 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:id=
"@+id/chat_text_edit"
android:id=
"@+id/chat_text_edit"
android:layout_marginTop=
"2dp"
android:maxLines=
"4"
android:maxLines=
"4"
android:textSize=
"18dp"
android:textSize=
"18dp"
android:textColorHint=
"#b2b2b2"
android:textColorHint=
"#b2b2b2"
android:ems=
"10"
android:imeOptions=
"flagNoExtractUi"
android:imeOptions=
"flagNoExtractUi"
android:inputType=
"textCapSentences|textMultiLine"
android:inputType=
"textCapSentences|textMultiLine"
android:maxLength=
"16384"
android:maxLength=
"16384"
android:gravity=
"bottom"
android:layout_marginLeft=
"52dp"
android:layout_marginLeft=
"52dp"
android:layout_marginRight=
"2dp"
android:layout_marginRight=
"2dp"
android:layout_marginBottom=
"4dp"
android:paddingBottom=
"8dp"
android:paddingTop=
"4dp"
android:background=
"@null"
android:background=
"@null"
android:layout_marginBottom=
"12dp"
android:paddingTop=
"11dp"
android:textCursorDrawable=
"@null"
android:textCursorDrawable=
"@null"
android:textColor=
"#000000"
/>
android:textColor=
"#000000"
/>
...
...
TMessagesProj/src/main/res/layout/popup_notification_layout.xml
View file @
ea8760f9
...
@@ -50,20 +50,18 @@
...
@@ -50,20 +50,18 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:id=
"@+id/chat_text_edit"
android:id=
"@+id/chat_text_edit"
android:layout_marginTop=
"2dp"
android:maxLines=
"4"
android:maxLines=
"4"
android:textSize=
"18dp"
android:textSize=
"18dp"
android:textColorHint=
"#b2b2b2"
android:textColorHint=
"#b2b2b2"
android:ems=
"10"
android:imeOptions=
"flagNoExtractUi"
android:imeOptions=
"flagNoExtractUi"
android:inputType=
"textCapSentences|textMultiLine"
android:inputType=
"textCapSentences|textMultiLine"
android:maxLength=
"16384"
android:maxLength=
"16384"
android:gravity=
"bottom"
android:layout_marginLeft=
"52dp"
android:layout_marginLeft=
"52dp"
android:layout_marginRight=
"2dp"
android:layout_marginRight=
"2dp"
android:layout_marginBottom=
"4dp"
android:paddingBottom=
"8dp"
android:paddingTop=
"4dp"
android:background=
"@null"
android:background=
"@null"
android:layout_marginBottom=
"12dp"
android:paddingTop=
"11dp"
android:textCursorDrawable=
"@null"
android:textCursorDrawable=
"@null"
android:textColor=
"#000000"
/>
android:textColor=
"#000000"
/>
...
...
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