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
01e0b7ae
Commit
01e0b7ae
authored
Jun 13, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More bug fixes, new locales
parent
1cda12c7
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
836 additions
and
29 deletions
+836
-29
build.gradle
TMessagesProj/build.gradle
+1
-1
LocaleController.java
...rc/main/java/org/telegram/messenger/LocaleController.java
+22
-1
MediaController.java
...src/main/java/org/telegram/messenger/MediaController.java
+2
-1
PhotoViewer.java
TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java
+30
-17
ActionBarActivity.java
...va/org/telegram/ui/Views/ActionBar/ActionBarActivity.java
+14
-3
ActionBarMenuItem.java
...va/org/telegram/ui/Views/ActionBar/ActionBarMenuItem.java
+1
-0
strings.xml
TMessagesProj/src/main/res/values-ar/strings.xml
+0
-1
strings.xml
TMessagesProj/src/main/res/values-de/strings.xml
+0
-1
strings.xml
TMessagesProj/src/main/res/values-es/strings.xml
+0
-1
strings.xml
TMessagesProj/src/main/res/values-it/strings.xml
+0
-1
strings.xml
TMessagesProj/src/main/res/values-nl/strings.xml
+0
-1
strings.xml
TMessagesProj/src/main/res/values-pt-rBR/strings.xml
+383
-0
strings.xml
TMessagesProj/src/main/res/values-pt-rPT/strings.xml
+383
-0
strings.xml
TMessagesProj/src/main/res/values/strings.xml
+0
-1
No files found.
TMessagesProj/build.gradle
View file @
01e0b7ae
...
...
@@ -81,7 +81,7 @@ android {
defaultConfig
{
minSdkVersion
8
targetSdkVersion
19
versionCode
2
48
versionCode
2
50
versionName
"1.5.0"
}
}
TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java
View file @
01e0b7ae
...
...
@@ -160,6 +160,22 @@ public class LocaleController {
sortedLanguages
.
add
(
localeInfo
);
languagesDict
.
put
(
localeInfo
.
shortName
,
localeInfo
);
localeInfo
=
new
LocaleInfo
();
localeInfo
.
name
=
"Português (Brasil)"
;
localeInfo
.
nameEnglish
=
"Portuguese (Brazil)"
;
localeInfo
.
shortName
=
"pt_BR"
;
localeInfo
.
pathToFile
=
null
;
sortedLanguages
.
add
(
localeInfo
);
languagesDict
.
put
(
localeInfo
.
shortName
,
localeInfo
);
localeInfo
=
new
LocaleInfo
();
localeInfo
.
name
=
"Português (Portugal)"
;
localeInfo
.
nameEnglish
=
"Portuguese (Portugal)"
;
localeInfo
.
shortName
=
"pt_PT"
;
localeInfo
.
pathToFile
=
null
;
sortedLanguages
.
add
(
localeInfo
);
languagesDict
.
put
(
localeInfo
.
shortName
,
localeInfo
);
loadOtherLanguages
();
for
(
LocaleInfo
locale
:
otherLanguages
)
{
...
...
@@ -382,7 +398,12 @@ public class LocaleController {
try
{
Locale
newLocale
=
null
;
if
(
localeInfo
.
shortName
!=
null
)
{
newLocale
=
new
Locale
(
localeInfo
.
shortName
);
String
[]
args
=
localeInfo
.
shortName
.
split
(
"_"
);
if
(
args
.
length
==
1
)
{
newLocale
=
new
Locale
(
localeInfo
.
shortName
);
}
else
{
newLocale
=
new
Locale
(
args
[
0
],
args
[
1
]);
}
if
(
newLocale
!=
null
)
{
if
(
override
)
{
languageOverride
=
localeInfo
.
shortName
;
...
...
TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java
View file @
01e0b7ae
...
...
@@ -949,6 +949,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
currentTotalPcmDuration
=
getTotalPcmDuration
();
audioTrackPlayer
=
new
AudioTrack
(
AudioManager
.
STREAM_MUSIC
,
48000
,
AudioFormat
.
CHANNEL_OUT_MONO
,
AudioFormat
.
ENCODING_PCM_16BIT
,
playerBufferSize
,
AudioTrack
.
MODE_STREAM
);
audioTrackPlayer
.
setStereoVolume
(
1.0f
,
1.0f
);
//audioTrackPlayer.setNotificationMarkerPosition((int)currentTotalPcmDuration);
audioTrackPlayer
.
setPlaybackPositionUpdateListener
(
new
AudioTrack
.
OnPlaybackPositionUpdateListener
()
{
@Override
...
...
@@ -1606,7 +1607,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
long
dateTaken
=
cursor
.
getLong
(
dateColumn
);
int
orientation
=
cursor
.
getInt
(
orientationColumn
);
if
(
path
==
null
||
path
.
isEmpty
()
)
{
if
(
path
==
null
||
path
.
length
()
==
0
)
{
continue
;
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java
View file @
01e0b7ae
...
...
@@ -102,6 +102,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
private
int
animationInProgress
=
0
;
private
boolean
disableShowCheck
=
false
;
private
Animation
.
AnimationListener
animationListener
;
private
ImageReceiver
leftImage
=
new
ImageReceiver
();
private
ImageReceiver
centerImage
=
new
ImageReceiver
();
...
...
@@ -245,6 +246,14 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
setWillNotDraw
(
false
);
}
@Override
protected
void
onAnimationEnd
()
{
super
.
onAnimationEnd
();
if
(
getInstance
().
animationListener
!=
null
)
{
getInstance
().
animationListener
.
onAnimationEnd
(
null
);
}
}
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
getInstance
().
onDraw
(
canvas
);
...
...
@@ -725,19 +734,21 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
if
(
overlayViewVisible
==
show
)
{
return
;
}
overlayViewVisible
=
show
;
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
11
)
{
AnimatorSet
animatorSet
=
new
AnimatorSet
();
animatorSet
.
playTogether
(
ObjectAnimator
.
ofFloat
(
currentOverlay
,
"alpha"
,
show
?
1.0f
:
0.0f
)
);
animatorSet
.
setDuration
(
200
);
animatorSet
.
start
();
}
else
{
AlphaAnimation
animation
=
new
AlphaAnimation
(
show
?
0.0f
:
1.0f
,
show
?
1.0f
:
0.0f
);
animation
.
setDuration
(
200
);
animation
.
setFillAfter
(
true
);
currentOverlay
.
startAnimation
(
animation
);
if
(
currentOverlay
.
getVisibility
()
==
View
.
VISIBLE
)
{
overlayViewVisible
=
show
;
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
11
)
{
AnimatorSet
animatorSet
=
new
AnimatorSet
();
animatorSet
.
playTogether
(
ObjectAnimator
.
ofFloat
(
currentOverlay
,
"alpha"
,
show
?
1.0f
:
0.0f
)
);
animatorSet
.
setDuration
(
200
);
animatorSet
.
start
();
}
else
{
AlphaAnimation
animation
=
new
AlphaAnimation
(
show
?
0.0f
:
1.0f
,
show
?
1.0f
:
0.0f
);
animation
.
setDuration
(
200
);
animation
.
setFillAfter
(
true
);
currentOverlay
.
startAnimation
(
animation
);
}
}
}
...
...
@@ -1122,7 +1133,6 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
}
actionBarLayer
.
setTitle
(
LocaleController
.
formatString
(
"Of"
,
R
.
string
.
Of
,
(
totalImagesCount
-
imagesArr
.
size
())
+
currentIndex
+
1
,
totalImagesCount
));
}
updateActionOverlays
();
}
else
if
(!
imagesArrLocations
.
isEmpty
())
{
currentFileLocation
=
imagesArrLocations
.
get
(
index
);
actionBarLayer
.
setTitle
(
LocaleController
.
formatString
(
"Of"
,
R
.
string
.
Of
,
currentIndex
+
1
,
imagesArrLocations
.
size
()));
...
...
@@ -1563,7 +1573,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
animationSet
.
addAnimation
(
scaleAnimation
);
animationSet
.
setDuration
(
150
);
animationInProgress
=
2
;
animationSet
.
setAnimationListener
(
new
Animation
.
AnimationListener
()
{
animationSet
.
setAnimationListener
(
animationListener
=
new
Animation
.
AnimationListener
()
{
@Override
public
void
onAnimationStart
(
Animation
animation
)
{
...
...
@@ -1571,8 +1581,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
@Override
public
void
onAnimationEnd
(
Animation
animation
)
{
animationInProgress
=
0
;
onPhotoClosed
(
object
);
if
(
animationListener
!=
null
)
{
animationInProgress
=
0
;
onPhotoClosed
(
object
);
animationListener
=
null
;
}
}
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/ActionBar/ActionBarActivity.java
View file @
01e0b7ae
...
...
@@ -17,6 +17,7 @@ import android.content.Intent;
import
android.content.res.Configuration
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.view.ActionMode
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
...
...
@@ -442,7 +443,7 @@ public class ActionBarActivity extends Activity {
return
actionBar
;
}
private
void
presentFragmentInternalRemoveOld
(
boolean
removeLast
,
BaseFragment
fragment
)
{
private
void
presentFragmentInternalRemoveOld
(
boolean
removeLast
,
final
BaseFragment
fragment
)
{
if
(
fragment
==
null
)
{
return
;
}
...
...
@@ -513,7 +514,12 @@ public class ActionBarActivity extends Activity {
transitionAnimationInProgress
=
false
;
transitionAnimationStartTime
=
0
;
fragment
.
onOpenAnimationEnd
();
presentFragmentInternalRemoveOld
(
removeLast
,
currentFragment
);
new
Handler
().
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
presentFragmentInternalRemoveOld
(
removeLast
,
currentFragment
);
}
});
listener
=
null
;
}
}
...
...
@@ -577,6 +583,7 @@ public class ActionBarActivity extends Activity {
transitionAnimationStartTime
=
System
.
currentTimeMillis
();
transitionAnimationInProgress
=
true
;
closeAnimation
.
reset
();
closeAnimation
.
setFillAfter
(
true
);
closeAnimation
.
setAnimationListener
(
listener
=
new
Animation
.
AnimationListener
()
{
@Override
public
void
onAnimationStart
(
Animation
animation
)
{
...
...
@@ -588,7 +595,11 @@ public class ActionBarActivity extends Activity {
if
(
transitionAnimationInProgress
)
{
transitionAnimationInProgress
=
false
;
transitionAnimationStartTime
=
0
;
closeLastFragmentInternalRemoveOld
(
currentFragment
);
new
Handler
().
post
(
new
Runnable
()
{
public
void
run
()
{
closeLastFragmentInternalRemoveOld
(
currentFragment
);
}
});
listener
=
null
;
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/ActionBar/ActionBarMenuItem.java
View file @
01e0b7ae
...
...
@@ -127,6 +127,7 @@ public class ActionBarMenuItem extends ImageView {
popupWindow
.
setClippingEnabled
(
true
);
popupWindow
.
setInputMethodMode
(
ActionBarPopupWindow
.
INPUT_METHOD_NOT_NEEDED
);
popupWindow
.
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_UNSPECIFIED
);
popupLayout
.
measure
(
MeasureSpec
.
makeMeasureSpec
(
Utilities
.
dp
(
1000
),
MeasureSpec
.
AT_MOST
),
MeasureSpec
.
makeMeasureSpec
(
Utilities
.
dp
(
1000
),
MeasureSpec
.
AT_MOST
));
}
if
(
popupLayout
.
getMeasuredWidth
()
==
0
)
{
popupWindow
.
showAsDropDown
(
this
,
parentActionBar
.
getMeasuredWidth
()
-
popupLayout
.
getMeasuredWidth
()
-
getLeft
()
-
parentMenu
.
getLeft
(),
0
);
...
...
TMessagesProj/src/main/res/values-ar/strings.xml
View file @
01e0b7ae
...
...
@@ -294,7 +294,6 @@
<string
name=
"Gallery"
>
الألبوم
</string>
<string
name=
"AllPhotos"
>
All Photos
</string>
<string
name=
"NoPhotos"
>
No photos yet
</string>
<string
name=
"SendingPhotos"
>
Sending photos... %1$d of %2$d
</string>
<!--button titles-->
<string
name=
"Next"
>
التالي
</string>
...
...
TMessagesProj/src/main/res/values-de/strings.xml
View file @
01e0b7ae
...
...
@@ -294,7 +294,6 @@
<string
name=
"Gallery"
>
Galerie
</string>
<string
name=
"AllPhotos"
>
All Photos
</string>
<string
name=
"NoPhotos"
>
No photos yet
</string>
<string
name=
"SendingPhotos"
>
Sending photos... %1$d of %2$d
</string>
<!--button titles-->
<string
name=
"Next"
>
Weiter
</string>
...
...
TMessagesProj/src/main/res/values-es/strings.xml
View file @
01e0b7ae
...
...
@@ -294,7 +294,6 @@
<string
name=
"Gallery"
>
Galería
</string>
<string
name=
"AllPhotos"
>
All Photos
</string>
<string
name=
"NoPhotos"
>
No photos yet
</string>
<string
name=
"SendingPhotos"
>
Sending photos... %1$d of %2$d
</string>
<!--button titles-->
<string
name=
"Next"
>
Siguiente
</string>
...
...
TMessagesProj/src/main/res/values-it/strings.xml
View file @
01e0b7ae
...
...
@@ -294,7 +294,6 @@
<string
name=
"Gallery"
>
Galleria
</string>
<string
name=
"AllPhotos"
>
All Photos
</string>
<string
name=
"NoPhotos"
>
No photos yet
</string>
<string
name=
"SendingPhotos"
>
Sending photos... %1$d of %2$d
</string>
<!--button titles-->
<string
name=
"Next"
>
Avanti
</string>
...
...
TMessagesProj/src/main/res/values-nl/strings.xml
View file @
01e0b7ae
...
...
@@ -294,7 +294,6 @@
<string
name=
"Gallery"
>
Galerij
</string>
<string
name=
"AllPhotos"
>
All Photos
</string>
<string
name=
"NoPhotos"
>
No photos yet
</string>
<string
name=
"SendingPhotos"
>
Sending photos... %1$d of %2$d
</string>
<!--button titles-->
<string
name=
"Next"
>
Volgende
</string>
...
...
TMessagesProj/src/main/res/values-pt-rBR/strings.xml
0 → 100644
View file @
01e0b7ae
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/res/values-pt-rPT/strings.xml
0 → 100644
View file @
01e0b7ae
This diff is collapsed.
Click to expand it.
TMessagesProj/src/main/res/values/strings.xml
View file @
01e0b7ae
...
...
@@ -294,7 +294,6 @@
<string
name=
"Gallery"
>
Gallery
</string>
<string
name=
"AllPhotos"
>
All Photos
</string>
<string
name=
"NoPhotos"
>
No photos yet
</string>
<string
name=
"SendingPhotos"
>
Sending photos... %1$d of %2$d
</string>
<!--button titles-->
<string
name=
"Next"
>
Next
</string>
...
...
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