Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
36e1debe
Kaydet (Commit)
36e1debe
authored
Agu 02, 2012
tarafından
Iain Billett
Kaydeden (comit)
Michael Meeks
Agu 07, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Quick fix for upside down thumbnails.
Change-Id: I089c78f050fbea068b394de9205322dc62e28764
üst
12fff840
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
13 deletions
+34
-13
black_white_gradient.xml
...LibreOffice4Android/res/drawable/black_white_gradient.xml
+16
-0
file_explorer_grid_item.xml
...ibreOffice4Android/res/layout/file_explorer_grid_item.xml
+3
-3
DocumentLoader.java
...e4Android/src/org/libreoffice/android/DocumentLoader.java
+9
-9
LibreOfficeUIActivity.java
...Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+6
-1
No files found.
android/experimental/LibreOffice4Android/res/drawable/black_white_gradient.xml
0 → 100644
Dosyayı görüntüle @
36e1debe
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:type=
"radial"
android:gradientRadius=
"200"
android:startColor=
"#FF000000"
android:endColor=
"#00FFFFFF"
android:angle=
"45"
/>
<padding
android:left=
"7dp"
android:top=
"7dp"
android:right=
"7dp"
android:bottom=
"7dp"
/>
<corners
android:radius=
"8dp"
/>
</shape>
\ No newline at end of file
android/experimental/LibreOffice4Android/res/layout/file_explorer_grid_item.xml
Dosyayı görüntüle @
36e1debe
...
...
@@ -8,16 +8,15 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingTop=
"10dp"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/grid_item_image"
android:layout_width=
"100dp"
android:layout_height=
"142dp"
android:paddingTop=
"15dp"
android:paddingBottom=
"10dp"
android:scaleType=
"fitStart"
android:layout_gravity=
"center"
>
android:layout_gravity=
"center"
>
</ImageView>
<TextView
...
...
@@ -27,6 +26,7 @@
android:text=
"@+id/label"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:paddingTop=
"10dp"
android:layout_gravity=
"center"
android:textSize=
"15dp"
android:textStyle=
"bold"
...
...
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
Dosyayı görüntüle @
36e1debe
...
...
@@ -33,6 +33,7 @@ import org.libreoffice.R;
import
android.app.Activity
;
import
android.graphics.Bitmap
;
import
android.graphics.Matrix
;
import
android.graphics.Color
;
import
android.os.AsyncTask
;
import
android.os.Bundle
;
...
...
@@ -1110,22 +1111,21 @@ public class DocumentLoader
// Could easily make a new (larger) thumb but recycling
// should be faster & more efficient, better for the environment ;-)
//ll = (LinearLayout)findViewById( R.id.navigator);
// Bitmap bmp = ( (ThumbnailView)ll.getChildAt( 0 ) ).getBitmap();
ByteBuffer
bb
=
renderPage
(
0
,
100
,
(
int
)(
100
*
Math
.
sqrt
(
2
)
)
);
// bb.flip();
Bitmap
bmp
=
Bitmap
.
createBitmap
(
100
,
(
int
)(
100
*
Math
.
sqrt
(
2
)
),
Bitmap
.
Config
.
ARGB_8888
);
bmp
.
copyPixelsFromBuffer
(
bb
);
Bitmap
bmpAlpha
=
(
(
ThumbnailView
)
ll
.
getChildAt
(
0
)
).
getBitmap
();
//For now use these 3 lines to turn the bitmap right way up.
Matrix
m
=
new
Matrix
();
m
.
preScale
(
1.0f
,
-
1.0f
);
Bitmap
bmp
=
Bitmap
.
createBitmap
(
bmpAlpha
,
0
,
0
,
bmpAlpha
.
getWidth
(),
bmpAlpha
.
getHeight
(),
m
,
true
);
File
file
=
new
File
(
extras
.
getString
(
"input"
));
Log
.
i
(
TAG
,
"onDestroy "
+
extras
.
getString
(
"input"
));
File
dir
=
file
.
getParentFile
();
File
thumbnailFile
=
new
File
(
dir
,
"."
+
file
.
getName
().
split
(
"[.]"
)[
0
]
+
".png"
);
try
{
/*(ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.JPEG, 40, bytes);
if( !thumbnailFile.isFile() )
thumbnailFile.createNewFile();
ByteArrayOutputStream
bytes
=
new
ByteArrayOutputStream
();
bmp
.
compress
(
Bitmap
.
CompressFormat
.
PNG
,
40
,
bytes
);
thumbnailFile
.
createNewFile
();
FileOutputStream
fo
=
new
FileOutputStream
(
thumbnailFile
);
fo
.
write
(
bytes
.
toByteArray
());*/
if
(
!
thumbnailFile
.
isFile
()
)
...
...
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
Dosyayı görüntüle @
36e1debe
...
...
@@ -38,6 +38,7 @@ import android.app.ActionBar.OnNavigationListener;
import
android.app.Activity
;
import
android.os.AsyncTask
;
import
android.graphics.Bitmap
;
import
android.graphics.Matrix
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
...
...
@@ -855,11 +856,15 @@ class ListItemAdapter implements ListAdapter{
ByteBuffer
bb
=
renderPage
(
0
,
widthInPx
,
heightInPx
);
Bitmap
bm
=
Bitmap
.
createBitmap
(
widthInPx
,
heightInPx
,
Bitmap
.
Config
.
ARGB_8888
);
bm
.
copyPixelsFromBuffer
(
bb
);
Matrix
m
=
new
Matrix
();
m
.
preScale
(
1.0f
,
-
1.0f
);
Bitmap
bmp
=
Bitmap
.
createBitmap
(
bm
,
0
,
0
,
bm
.
getWidth
(),
bm
.
getHeight
(),
m
,
true
);
File
dir
=
file
.
getParentFile
();
File
thumbnailFile
=
new
File
(
dir
,
"."
+
file
.
getName
().
split
(
"[.]"
)[
0
]
+
".png"
);
try
{
ByteArrayOutputStream
bytes
=
new
ByteArrayOutputStream
();
bm
.
compress
(
Bitmap
.
CompressFormat
.
PNG
,
40
,
bytes
);
bm
p
.
compress
(
Bitmap
.
CompressFormat
.
PNG
,
40
,
bytes
);
thumbnailFile
.
createNewFile
();
FileOutputStream
fo
=
new
FileOutputStream
(
thumbnailFile
);
fo
.
write
(
bytes
.
toByteArray
());
...
...
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