diff options
56 files changed, 126 insertions, 192 deletions
diff --git a/res/layout-sw800dp/table.xml b/res/layout-sw800dp/table.xml index e063cd5..c40ee48 100644 --- a/res/layout-sw800dp/table.xml +++ b/res/layout-sw800dp/table.xml @@ -23,6 +23,15 @@ android:layout_width="match_parent" android:layout_height="match_parent" > + <View + android:id="@+id/scrim" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@+drawable/table" + android:alpha="0" + android:visibility="gone" + /> + <FrameLayout android:id="@+id/stageleft" android:layout_width="match_parent" diff --git a/res/layout/table.xml b/res/layout/table.xml index 7cdb51a..10622f5 100644 --- a/res/layout/table.xml +++ b/res/layout/table.xml @@ -26,6 +26,15 @@ android:background="@+drawable/table" android:focusable="true" > + <View + android:id="@+id/scrim" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@+drawable/table" + android:alpha="0" + android:visibility="gone" + /> + <FrameLayout android:id="@+id/stageleft" android:layout_width="match_parent" diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml index d0be698..20fd794 100644 --- a/res/values-af/strings.xml +++ b/res/values-af/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Voorraadfoto\'s"</string> <string name="local_source_name" msgid="6487253091085518505">"Foto\'s op die toestel"</string> <string name="need_to_configure" msgid="1269102638159389032">"Geen foto\'s gekies nie."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Kies almal"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Ontkies almal"</string> - <string name="no_photos" msgid="4262083523147564199">"Geen foto\'s op die toestel nie."</string> </resources> diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml index 5a07a36..d8e848e 100644 --- a/res/values-am/strings.xml +++ b/res/values-am/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"የክምችት ፎቶዎች"</string> <string name="local_source_name" msgid="6487253091085518505">"በመሣሪያ ላይ ያሉ መሣሪያዎች"</string> <string name="need_to_configure" msgid="1269102638159389032">"ምንም ፎቶዎች አልተመረጡም።"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"ሁሉንም ምረጥ"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"ሁሉንም አትምረጥ"</string> - <string name="no_photos" msgid="4262083523147564199">"በመሣሪያው ላይ ምንም ፎቶዎች የሉም።"</string> </resources> diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 8c15d8c..1e16048 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"صور المخزون"</string> <string name="local_source_name" msgid="6487253091085518505">"الصور على الجهاز"</string> <string name="need_to_configure" msgid="1269102638159389032">"لم يتم تحديد أي صور."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"تحديد الكل"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"إلغاء تحديد الكل"</string> - <string name="no_photos" msgid="4262083523147564199">"لا يحتوي الجهاز على أية صور."</string> </resources> diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml index 45a7a41..3be087b 100644 --- a/res/values-be/strings.xml +++ b/res/values-be/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Захаваныя фотаздымкi"</string> <string name="local_source_name" msgid="6487253091085518505">"Фота на прыладзе"</string> <string name="need_to_configure" msgid="1269102638159389032">"Няма выбраных фотаздымкаў."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Выбраць усё"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Адмяніць выбар усяго"</string> - <string name="no_photos" msgid="4262083523147564199">"На прыладзе няма фатаграфій."</string> </resources> diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index 0097b4d..acf55c8 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Стокови снимки"</string> <string name="local_source_name" msgid="6487253091085518505">"Снимки на устройството"</string> <string name="need_to_configure" msgid="1269102638159389032">"Няма избрани снимки."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Избор на всичко"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Без избрани"</string> - <string name="no_photos" msgid="4262083523147564199">"Няма снимки в устройството."</string> </resources> diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index ce1ba91..e9c1bae 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotos en estoc"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotos del dispositiu"</string> <string name="need_to_configure" msgid="1269102638159389032">"No s\'ha seleccionat cap foto."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Selec. tot"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Anul. sel. tot"</string> - <string name="no_photos" msgid="4262083523147564199">"No hi ha cap foto al dispositiu."</string> </resources> diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 9272852..4f37b0c 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotky z fotobanky"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotky v zařízení"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nejsou vybrány žádné fotky."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Vybrat vše"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Zrušit výběr"</string> - <string name="no_photos" msgid="4262083523147564199">"V zařízení nejsou žádné fotografie."</string> </resources> diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index e7a96cb..c0fd023 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Arkivfotos"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotos på enheden"</string> <string name="need_to_configure" msgid="1269102638159389032">"Ingen fotos valgt."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Vælg alle"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Fravælg alle"</string> - <string name="no_photos" msgid="4262083523147564199">"Der er ingen billeder på enheden."</string> </resources> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 0d41eb2..6b8f480 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Stockfotos"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotos auf Gerät"</string> <string name="need_to_configure" msgid="1269102638159389032">"Keine Fotos ausgewählt"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Alle auswählen"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Keine auswählen"</string> - <string name="no_photos" msgid="4262083523147564199">"Keine Fotos auf dem Gerät"</string> </resources> diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 22dc407..603c4f4 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Φωτογραφίες στοκ"</string> <string name="local_source_name" msgid="6487253091085518505">"Φωτογραφίες στη συσκευή"</string> <string name="need_to_configure" msgid="1269102638159389032">"Δεν επιλέχθηκαν φωτογραφίες."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Επιλογή όλων"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Αποεπιλέξτε όλα"</string> - <string name="no_photos" msgid="4262083523147564199">"Δεν υπάρχουν φωτογραφίες στη συσκευή."</string> </resources> diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml index 0ea488f..7aa02e4 100644 --- a/res/values-en-rGB/strings.xml +++ b/res/values-en-rGB/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Stock photos"</string> <string name="local_source_name" msgid="6487253091085518505">"Photos on Device"</string> <string name="need_to_configure" msgid="1269102638159389032">"No photos selected."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Select All"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Deselect All"</string> - <string name="no_photos" msgid="4262083523147564199">"No photos on the device."</string> </resources> diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index e202b79..a7a5e8a 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotos en stock"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotos en el dispositivo"</string> <string name="need_to_configure" msgid="1269102638159389032">"No hay fotos seleccionadas."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Marcar todos"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Desmarcar todos"</string> - <string name="no_photos" msgid="4262083523147564199">"No hay fotos en el dispositivo."</string> </resources> diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 7d17cd1..f72ee16 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotos de archivo"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotos del dispositivo"</string> <string name="need_to_configure" msgid="1269102638159389032">"No se ha seleccionado ninguna foto."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Seleccionar todo"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Desmarcar todo"</string> - <string name="no_photos" msgid="4262083523147564199">"No hay fotos en el dispositivo."</string> </resources> diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml index 2a0c3d1..061f4b7 100644 --- a/res/values-et/strings.xml +++ b/res/values-et/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotovaramu"</string> <string name="local_source_name" msgid="6487253091085518505">"Seadmesse salvestatud fotod"</string> <string name="need_to_configure" msgid="1269102638159389032">"Valitud ei ole ühtegi fotot."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Vali kõik"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Tühista kõik valikud"</string> - <string name="no_photos" msgid="4262083523147564199">"Seadmes ei ole fotosid."</string> </resources> diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index 0d3c9e0..83408b2 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"عکسهای موجود"</string> <string name="local_source_name" msgid="6487253091085518505">"عکسهای موجود در دستگاه"</string> <string name="need_to_configure" msgid="1269102638159389032">"عکسی انتخاب نشده است."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"انتخاب همه"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"لغو انتخاب همه"</string> - <string name="no_photos" msgid="4262083523147564199">"هیچ عکسی در دستگاه نیست."</string> </resources> diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 640cc1b..1ec7f15 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Varastossa olevat kuvat"</string> <string name="local_source_name" msgid="6487253091085518505">"Kuvat laitteella"</string> <string name="need_to_configure" msgid="1269102638159389032">"Ei valittuja kuvia."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Valitse kaikki"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Poista kaikki valinnat"</string> - <string name="no_photos" msgid="4262083523147564199">"Laitteella ei ole kuvia."</string> </resources> diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 5f79ad2..92b4a1b 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Banque de photos"</string> <string name="local_source_name" msgid="6487253091085518505">"Photos de l\'appareil"</string> <string name="need_to_configure" msgid="1269102638159389032">"Aucune photo sélectionnée."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Tout sélectionner"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Tout désélectionner"</string> - <string name="no_photos" msgid="4262083523147564199">"Aucune photo sur l\'appareil"</string> </resources> diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index 40eaad2..aeb7c9c 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"स्टॉक फ़ोटो"</string> <string name="local_source_name" msgid="6487253091085518505">"उपकरण पर फ़ोटो"</string> <string name="need_to_configure" msgid="1269102638159389032">"कोई फ़ोटो नहीं चुना गया."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"सभी को चुनें"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"सभी अचयनित करें"</string> - <string name="no_photos" msgid="4262083523147564199">"उपकरण पर कोई फ़ोटो नहीं है."</string> </resources> diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index bb62c42..9e01908 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Arhivske fotografije"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotografije na uređaju"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nije odabrana nijedna fotografija."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Odaberi sve"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Poništi sve"</string> - <string name="no_photos" msgid="4262083523147564199">"Na uređaju nema fotografija."</string> </resources> diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index 2d3855f..257431e 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotótárfotók"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotók az eszközön"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nincsenek fotók kiválasztva."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Összes"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Semelyik"</string> - <string name="no_photos" msgid="4262083523147564199">"Nincsenek fényképek az eszközön."</string> </resources> diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index 758e830..06d3926 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Foto Stok"</string> <string name="local_source_name" msgid="6487253091085518505">"Foto di Perangkat"</string> <string name="need_to_configure" msgid="1269102638159389032">"Tidak ada foto yang dipilih."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Pilih Semua"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Batalkan Semua"</string> - <string name="no_photos" msgid="4262083523147564199">"Tidak ada foto di perangkat."</string> </resources> diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index fd50f8c..9a35e93 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Foto di archivi stock"</string> <string name="local_source_name" msgid="6487253091085518505">"Foto su dispositivo"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nessuna foto selezionata."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Seleziona tutto"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Desel. tutto"</string> - <string name="no_photos" msgid="4262083523147564199">"Nessuna foto sul dispositivo."</string> </resources> diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index 49b9c4f..cc7b635 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"תמונות במלאי"</string> <string name="local_source_name" msgid="6487253091085518505">"תמונות במכשיר"</string> <string name="need_to_configure" msgid="1269102638159389032">"לא נבחרו תמונות."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"בחר הכל"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"בטל את כל הבחירות"</string> - <string name="no_photos" msgid="4262083523147564199">"אין תמונות במכשיר."</string> </resources> diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 722faa9..a5d613b 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"ストックフォト"</string> <string name="local_source_name" msgid="6487253091085518505">"端末上の画像"</string> <string name="need_to_configure" msgid="1269102638159389032">"画像が選択されていません。"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"すべて選択"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"選択をすべて解除"</string> - <string name="no_photos" msgid="4262083523147564199">"端末に画像がありません。"</string> </resources> diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 29b8aef..2d470db 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"스톡 사진"</string> <string name="local_source_name" msgid="6487253091085518505">"기기에 저장된 사진"</string> <string name="need_to_configure" msgid="1269102638159389032">"선택한 사진이 없습니다."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"모두 선택"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"모두 선택취소"</string> - <string name="no_photos" msgid="4262083523147564199">"기기에 사진이 없습니다."</string> </resources> diff --git a/res/values-land-notouch/config.xml b/res/values-land-notouch/config.xml index d125dd1..5e088e4 100644 --- a/res/values-land-notouch/config.xml +++ b/res/values-land-notouch/config.xml @@ -27,4 +27,6 @@ <!-- Duration in milliseconds for the pickup animation. --> <integer name="photo_pickup_duration">1500</integer> + <!-- Enable hardware layer optimization (interferes with dragging). --> + <bool name="enable_background_optimization">true</bool> </resources>
\ No newline at end of file diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index f24ba05..7520f85 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Šabloninės nuotraukos"</string> <string name="local_source_name" msgid="6487253091085518505">"Nuotraukos įrenginyje"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nėra pasirinktų nuotraukų."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Rinktis viską"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Panaikint žym."</string> - <string name="no_photos" msgid="4262083523147564199">"Įrenginyje nėra nuotraukų."</string> </resources> diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index dd3a161..490ca4f 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Krājuma fotoattēli"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotoattēli ierīcē"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nav atlasīts neviens fotoattēls."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Atlasīt visus"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Atcelt atlasi"</string> - <string name="no_photos" msgid="4262083523147564199">"Ierīcē nav neviena fotoattēla."</string> </resources> diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml index 0d1b9c0..f5aee42 100644 --- a/res/values-ms/strings.xml +++ b/res/values-ms/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Foto Stok"</string> <string name="local_source_name" msgid="6487253091085518505">"Foto pada Peranti"</string> <string name="need_to_configure" msgid="1269102638159389032">"Tiada foto dipilih."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Pilih Semua"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Nyahpilih Semua"</string> - <string name="no_photos" msgid="4262083523147564199">"Tiada foto pada peranti."</string> </resources> diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index 3fc2057..05522eb 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -17,7 +17,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name" msgid="6441943862284988546">"Bilder som skjermsparere"</string> - <string name="table_screensaver_name" msgid="1150228032617397055">"Bildekollasj"</string> + <string name="table_screensaver_name" msgid="1150228032617397055">"Bildetabell"</string> <string name="flipper_screensaver_name" msgid="6988572107391523141">"Bilderamme"</string> <string name="posts_album_name" msgid="5628151551239729515">"Bilder fra innlegg"</string> <string name="uploads_album_name" msgid="4057519060978630370">"Direkteopplastinger"</string> @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Bildedatabase"</string> <string name="local_source_name" msgid="6487253091085518505">"Bilder på enheten"</string> <string name="need_to_configure" msgid="1269102638159389032">"Ingen bilder valgt."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Merk alle"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Fjern all merking"</string> - <string name="no_photos" msgid="4262083523147564199">"Ingen bilder på enheten."</string> </resources> diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 4cb6ac8..c41cdf9 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Stockfoto\'s"</string> <string name="local_source_name" msgid="6487253091085518505">"Foto\'s op apparaat"</string> <string name="need_to_configure" msgid="1269102638159389032">"Geen foto\'s geselecteerd."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Alles selecteren"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Selec. opheffen"</string> - <string name="no_photos" msgid="4262083523147564199">"Geen foto\'s op het apparaat."</string> </resources> diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 11ba127..d49b918 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -19,13 +19,10 @@ <string name="app_name" msgid="6441943862284988546">"Wygaszacze ze zdjęciami"</string> <string name="table_screensaver_name" msgid="1150228032617397055">"Tablica ze zdjęciami"</string> <string name="flipper_screensaver_name" msgid="6988572107391523141">"Ramka foto"</string> - <string name="posts_album_name" msgid="5628151551239729515">"Zdjęcia z wpisów"</string> + <string name="posts_album_name" msgid="5628151551239729515">"Zdjęcia z postów"</string> <string name="uploads_album_name" msgid="4057519060978630370">"Z autoprzesyłania"</string> <string name="unknown_album_name" msgid="2135521368192091267">"Album bez nazwy"</string> <string name="stock_photo_album_name" msgid="3150527596227525460">"Zdjęcia licencjonowane"</string> <string name="local_source_name" msgid="6487253091085518505">"Zdjęcia na urządzeniu"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nie wybrano zdjęć."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Zaznacz wszystko"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Wyczyść wszystko"</string> - <string name="no_photos" msgid="4262083523147564199">"Brak zdjęć na tym urządzeniu."</string> </resources> diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml index 2d7152d..6b5276e 100644 --- a/res/values-pt-rPT/strings.xml +++ b/res/values-pt-rPT/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Banco de Imagens"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotografias no Dispositivo"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nenhuma fotografia selecionada."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Selecionar Tudo"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Desmarcar Tudo"</string> - <string name="no_photos" msgid="4262083523147564199">"Sem fotografias no dispositivo."</string> </resources> diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 311f249..d06f11f 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Banco de fotos"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotos no dispositivo"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nenhuma foto selecionada."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Selecionar tudo"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Desmarcar tudo"</string> - <string name="no_photos" msgid="4262083523147564199">"Nenhuma foto no dispositivo."</string> </resources> diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index a1a9259..390ef57 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotografii din stoc"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotografii de pe gadget"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nu a fost selectată nicio fotografie."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Selectați tot"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Deselectați tot"</string> - <string name="no_photos" msgid="4262083523147564199">"Nu există fotografii pe dispozitiv."</string> </resources> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index de26942..aa259e6 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Снимки из фотобанков"</string> <string name="local_source_name" msgid="6487253091085518505">"Фото на устройстве"</string> <string name="need_to_configure" msgid="1269102638159389032">"Ничего не выбрано"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Выбрать все"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Отменить выбор"</string> - <string name="no_photos" msgid="4262083523147564199">"На устройстве нет фотографий."</string> </resources> diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index 94ee9df..f317101 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotografie z fotobanky"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotografie v zariadení"</string> <string name="need_to_configure" msgid="1269102638159389032">"Nie sú vybraté žiadne fotografie."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Vybrať všetko"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Zrušiť výber"</string> - <string name="no_photos" msgid="4262083523147564199">"Zariadenie neobsahuje žiadne fotografie."</string> </resources> diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml index 3902906..f1076d5 100644 --- a/res/values-sl/strings.xml +++ b/res/values-sl/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Fotografije na zalogi"</string> <string name="local_source_name" msgid="6487253091085518505">"Fotografije v napravi"</string> <string name="need_to_configure" msgid="1269102638159389032">"Izbrana ni nobena fotografija."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Izberi vse"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Počisti vse"</string> - <string name="no_photos" msgid="4262083523147564199">"V napravi ni fotografij."</string> </resources> diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index 0fbd11e..465309e 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Сток фотографије"</string> <string name="local_source_name" msgid="6487253091085518505">"Слике на уређају"</string> <string name="need_to_configure" msgid="1269102638159389032">"Није изабрана ниједна слика."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Изабери све"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Опозови све"</string> - <string name="no_photos" msgid="4262083523147564199">"Нема слика на уређају."</string> </resources> diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index a97a229..f374a67 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Bildbyråfoton"</string> <string name="local_source_name" msgid="6487253091085518505">"Foton på enheten"</string> <string name="need_to_configure" msgid="1269102638159389032">"Inga foton har markerats."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Markera alla"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Avmarkera alla"</string> - <string name="no_photos" msgid="4262083523147564199">"Det finns inga foton på enheten."</string> </resources> diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml index 74edf3e..9b1392b 100644 --- a/res/values-sw/strings.xml +++ b/res/values-sw/strings.xml @@ -20,12 +20,9 @@ <string name="table_screensaver_name" msgid="1150228032617397055">"Jedwali la Picha"</string> <string name="flipper_screensaver_name" msgid="6988572107391523141">"Fremu ya Picha"</string> <string name="posts_album_name" msgid="5628151551239729515">"Picha kutoka kwenye Machapisho"</string> - <string name="uploads_album_name" msgid="4057519060978630370">"Vipakiwa vya papo hapo"</string> + <string name="uploads_album_name" msgid="4057519060978630370">"Vipakiaji vya Papo hapo"</string> <string name="unknown_album_name" msgid="2135521368192091267">"Albamu Isiyo na Jina"</string> <string name="stock_photo_album_name" msgid="3150527596227525460">"Picha za Akiba"</string> <string name="local_source_name" msgid="6487253091085518505">"Picha katika Kifaa"</string> <string name="need_to_configure" msgid="1269102638159389032">"Hakuna picha zilizochaguliwa."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Chagua Zote"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Usichague yoyote"</string> - <string name="no_photos" msgid="4262083523147564199">"Hakuna picha kwenye kifaa."</string> </resources> diff --git a/res/values-sw800dp/config.xml b/res/values-sw800dp/config.xml index ec6a85f..8af15bc 100644 --- a/res/values-sw800dp/config.xml +++ b/res/values-sw800dp/config.xml @@ -14,13 +14,20 @@ limitations under the License. --> <resources> + + <!-- Maximum number of photos to leave on the table.--> + <integer name="table_capacity">8</integer> + <!-- Milliseconds between drops. --> <integer name="table_drop_period">75000</integer> <!-- Milliseconds to wait before the next fast drop.--> <integer name="fast_drop">5000</integer> - <!-- Duration in milliseconds for the pickup animation. --> + <!-- Parts per million ratio between image size and screen size. --> + <integer name="image_ratio">500000</integer> + + <!-- Duration in milliseconds for the pickup animation. --> <integer name="photo_pickup_duration">1500</integer> </resources> diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml index 8ae896b..254c269 100644 --- a/res/values-th/strings.xml +++ b/res/values-th/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"คลังภาพ"</string> <string name="local_source_name" msgid="6487253091085518505">"รูปภาพในอุปกรณ์"</string> <string name="need_to_configure" msgid="1269102638159389032">"ไม่ได้เลือกรูปภาพไว้"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"เลือกทั้งหมด"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"ยกเลิกการเลือก"</string> - <string name="no_photos" msgid="4262083523147564199">"ไม่มีรูปภาพบนอุปกรณ์"</string> </resources> diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml index ca83b8d..8b3adef 100644 --- a/res/values-tl/strings.xml +++ b/res/values-tl/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Mga Stock na Larawan"</string> <string name="local_source_name" msgid="6487253091085518505">"Mga Larawan sa Device"</string> <string name="need_to_configure" msgid="1269102638159389032">"Walang piniling mga larawan."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Piliin Lahat"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"I-deselect Lahat"</string> - <string name="no_photos" msgid="4262083523147564199">"Walang mga larawan sa device."</string> </resources> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 246082f..ea9f339 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Stok Fotoğraflar"</string> <string name="local_source_name" msgid="6487253091085518505">"Cihazdaki Fotoğraflar"</string> <string name="need_to_configure" msgid="1269102638159389032">"Seçili fotoğraf yok."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Tümünü Seç"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Hiçbirini Seçme"</string> - <string name="no_photos" msgid="4262083523147564199">"Cihazda hiç fotoğraf yok."</string> </resources> diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index ea56d1c..ff3b2fa 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Фотографії з фотобанку"</string> <string name="local_source_name" msgid="6487253091085518505">"Фотографії на пристрої"</string> <string name="need_to_configure" msgid="1269102638159389032">"Не вибрано жодної фотографії."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Вибрати все"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Відмінити все"</string> - <string name="no_photos" msgid="4262083523147564199">"На пристрої немає фотографій."</string> </resources> diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index 4b145f5..a60dded 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Ảnh trên kho ảnh"</string> <string name="local_source_name" msgid="6487253091085518505">"Ảnh trên thiết bị"</string> <string name="need_to_configure" msgid="1269102638159389032">"Không có ảnh nào được chọn."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Chọn tất cả"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Bỏ chọn tất cả"</string> - <string name="no_photos" msgid="4262083523147564199">"Không có ảnh trên thiết bị."</string> </resources> diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 80b0790..08e628a 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -17,7 +17,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name" msgid="6441943862284988546">"照片屏幕保护程序"</string> - <string name="table_screensaver_name" msgid="1150228032617397055">"照片桌面"</string> + <string name="table_screensaver_name" msgid="1150228032617397055">"照片表格"</string> <string name="flipper_screensaver_name" msgid="6988572107391523141">"相框"</string> <string name="posts_album_name" msgid="5628151551239729515">"信息中的照片"</string> <string name="uploads_album_name" msgid="4057519060978630370">"即时上传"</string> @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"图库照片"</string> <string name="local_source_name" msgid="6487253091085518505">"设备中的照片"</string> <string name="need_to_configure" msgid="1269102638159389032">"未选择任何照片。"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"全选"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"全部不选"</string> - <string name="no_photos" msgid="4262083523147564199">"设备上没有任何照片。"</string> </resources> diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index a3242f1..4446557 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"圖庫相片"</string> <string name="local_source_name" msgid="6487253091085518505">"裝置上的相片"</string> <string name="need_to_configure" msgid="1269102638159389032">"未選取任何相片。"</string> - <string name="photodream_select_all" msgid="6364858563337927827">"全選"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"取消全選"</string> - <string name="no_photos" msgid="4262083523147564199">"裝置上沒有任何相片。"</string> </resources> diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml index 885a2bf..4965da9 100644 --- a/res/values-zu/strings.xml +++ b/res/values-zu/strings.xml @@ -25,7 +25,4 @@ <string name="stock_photo_album_name" msgid="3150527596227525460">"Izithombe zesitoko"</string> <string name="local_source_name" msgid="6487253091085518505">"Izithombe kudivayisi"</string> <string name="need_to_configure" msgid="1269102638159389032">"Azikho izithombe ezikhethiwe."</string> - <string name="photodream_select_all" msgid="6364858563337927827">"Khetha konke"</string> - <string name="photodream_select_none" msgid="8816452124894525861">"Ungakhethi konke"</string> - <string name="no_photos" msgid="4262083523147564199">"Azikho izithombe kudivayisi."</string> </resources> diff --git a/res/values/config.xml b/res/values/config.xml index c3a6e65..9087266 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -109,5 +109,8 @@ <!-- Milliseconds that the focus will remain without user interaction. --> <integer name="max_focus_time">5000</integer> + <!-- Enable hardware layer optimization (interferes with dragging). --> + <bool name="enable_background_optimization">false</bool> + </resources> diff --git a/src/com/android/dreams/phototable/PhotoDreamSettingsReceiver.java b/src/com/android/dreams/phototable/PhotoDreamSettingsReceiver.java index d1a6199..208441b 100644 --- a/src/com/android/dreams/phototable/PhotoDreamSettingsReceiver.java +++ b/src/com/android/dreams/phototable/PhotoDreamSettingsReceiver.java @@ -28,6 +28,7 @@ public class PhotoDreamSettingsReceiver extends BroadcastReceiver { private static final String TAG = "PhotoDreamSettingsReceiver"; private static final String LOCAL_AUTHORITY = "media"; private static final String INTERNAL = "internal"; + private static final boolean DEBUG = false; public static final String ACTION_ADD_ALBUM = "add"; public static final String ACTION_REMOVE_ALBUM = "remove"; @@ -59,7 +60,7 @@ public class PhotoDreamSettingsReceiver extends BroadcastReceiver { albumId = PicasaSource.constructId(path.get(1)); } } - + if (DEBUG) Log.d(TAG, "receive: " + albumId + " is " + shown); for (int idx = 0; idx < settings.length; idx++) { settings[idx].setAlbumEnabled(albumId, shown); } diff --git a/src/com/android/dreams/phototable/PhotoSource.java b/src/com/android/dreams/phototable/PhotoSource.java index 442b9c3..d05eace 100644 --- a/src/com/android/dreams/phototable/PhotoSource.java +++ b/src/com/android/dreams/phototable/PhotoSource.java @@ -45,7 +45,7 @@ public abstract class PhotoSource { // This should be large enough for BitmapFactory to decode the header so // that we can mark and reset the input stream to avoid duplicate network i/o - private static final int BUFFER_SIZE = 128 * 1024; + private static final int BUFFER_SIZE = 32 * 1024; public class ImageData { public String id; @@ -186,7 +186,15 @@ public abstract class PhotoSource { } log(TAG, "decoding with inSampleSize " + options.inSampleSize); - bis.reset(); + try { + bis.reset(); + } catch (IOException ioe) { + // start over, something went wrong and we read too far into the image. + bis.close(); + is = data.getStream(longSide); + bis = new BufferedInputStream(is); + log(TAG, "resetting the stream"); + } options.inJustDecodeBounds = false; image = BitmapFactory.decodeStream(bis, null, options); rawLongSide = Math.max(options.outWidth, options.outHeight); diff --git a/src/com/android/dreams/phototable/PhotoTable.java b/src/com/android/dreams/phototable/PhotoTable.java index 7e7f92e..5cdd70f 100644 --- a/src/com/android/dreams/phototable/PhotoTable.java +++ b/src/com/android/dreams/phototable/PhotoTable.java @@ -34,6 +34,7 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.view.ViewParent; import android.view.ViewPropertyAnimator; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; @@ -44,7 +45,6 @@ import java.util.ArrayList; import java.util.Formatter; import java.util.HashSet; import java.util.LinkedList; -import java.util.List; import java.util.Random; import java.util.Set; @@ -105,11 +105,10 @@ public class PhotoTable extends FrameLayout { private final EdgeSwipeDetector mEdgeSwipeDetector; private final KeyboardInterpreter mKeyboardInterpreter; private final boolean mStoryModeEnabled; + private final boolean mBackgroudOptimization; private final long mPickUpDuration; private final int mMaxSelectionTime; private final int mMaxFocusTime; - private final List<View> mAnimating; - private DreamService mDream; private PhotoLaunchTask mPhotoLaunchTask; private LoadNaturalSiblingTask mLoadOnDeckTasks[]; @@ -125,6 +124,8 @@ public class PhotoTable extends FrameLayout { private int mHighlightColor; private ViewGroup mBackground; private ViewGroup mStageLeft; + private View mScrim; + private final Set<View> mWaitingToJoinBackground; public PhotoTable(Context context, AttributeSet as) { super(context, as); @@ -143,6 +144,7 @@ public class PhotoTable extends FrameLayout { mRedealCount = mResources.getInteger(R.integer.redeal_count); mTapToExit = mResources.getBoolean(R.bool.enable_tap_to_exit); mStoryModeEnabled = mResources.getBoolean(R.bool.enable_story_mode); + mBackgroudOptimization = mResources.getBoolean(R.bool.enable_background_optimization); mHighlightColor = mResources.getColor(R.color.highlight_color); mMaxSelectionTime = mResources.getInteger(R.integer.max_selection_time); mMaxFocusTime = mResources.getInteger(R.integer.max_focus_time); @@ -154,7 +156,7 @@ public class PhotoTable extends FrameLayout { mOnTable = new LinkedList<View>(); mPhotoSource = new PhotoSourcePlexor(getContext(), getContext().getSharedPreferences(PhotoTableDreamSettings.PREFS_NAME, 0)); - mAnimating = new ArrayList<View>(); + mWaitingToJoinBackground = new HashSet<View>(); mLauncher = new Launcher(); mFocusReaper = new FocusReaper(); mSelectionReaper = new SelectionReaper(); @@ -170,6 +172,7 @@ public class PhotoTable extends FrameLayout { public void onFinishInflate() { mBackground = (ViewGroup) findViewById(R.id.background); mStageLeft = (ViewGroup) findViewById(R.id.stageleft); + mScrim = findViewById(R.id.scrim); } public void setDream(DreamService dream) { @@ -283,7 +286,9 @@ public class PhotoTable extends FrameLayout { } public void setDefaultFocus() { - setFocus(mOnTable.getLast()); + if (mOnTable.size() > 0) { + setFocus(mOnTable.getLast()); + } } public void setFocus(View focus) { @@ -353,7 +358,9 @@ public class PhotoTable extends FrameLayout { public View moveFocus(View focus, float direction, float angle) { if (focus == null) { - setFocus(mOnTable.getLast()); + if (mOnTable.size() > 0) { + setFocus(mOnTable.getLast()); + } } else { final double alpha = Math.toRadians(direction); final double beta = Math.toRadians(Math.min(angle, 180f) / 2f); @@ -603,29 +610,60 @@ public class PhotoTable extends FrameLayout { /** De-emphasize the other photos on the table. */ public void fadeOutBackground(final View photo) { - mBackground.animate() - .withLayer() - .setDuration(mPickUpDuration) - .alpha(0f); + resolveBackgroundQueue(); + if (mBackgroudOptimization) { + mBackground.animate() + .withLayer() + .setDuration(mPickUpDuration) + .alpha(0f); + } else { + mScrim.setAlpha(0f); + mScrim.setVisibility(View.VISIBLE); + bringChildToFront(mScrim); + bringChildToFront(photo); + mScrim.animate() + .withLayer() + .setDuration(mPickUpDuration) + .alpha(1f); + } } /** Return the other photos to foreground status. */ public void fadeInBackground(final View photo) { - mAnimating.add(photo); - mBackground.animate() - .withLayer() - .setDuration(mPickUpDuration) - .alpha(1f) - .withEndAction(new Runnable() { - @Override - public void run() { - mAnimating.remove(photo); - if (!mAnimating.contains(photo)) { - moveToBackground(photo); - } - } - }); + if (mBackgroudOptimization) { + mWaitingToJoinBackground.add(photo); + mBackground.animate() + .withLayer() + .setDuration(mPickUpDuration) + .alpha(1f) + .withEndAction(new Runnable() { + @Override + public void run() { + resolveBackgroundQueue(); + } + }); + } else { + bringChildToFront(mScrim); + bringChildToFront(photo); + mScrim.animate() + .withLayer() + .setDuration(mPickUpDuration) + .alpha(0f) + .withEndAction(new Runnable() { + @Override + public void run() { + mScrim.setVisibility(View.GONE); + } + }); + } + } + + private void resolveBackgroundQueue() { + for(View photo: mWaitingToJoinBackground) { + moveToBackground(photo); + } + mWaitingToJoinBackground.clear(); } /** Dispose of the photo gracefully, in case we can see some of it. */ @@ -824,7 +862,7 @@ public class PhotoTable extends FrameLayout { log("animate it"); // toss onto table - mAnimating.add(photo); + resolveBackgroundQueue(); photo.animate() .withLayer() .scaleX(mTableRatio / mImageRatio) @@ -837,34 +875,34 @@ public class PhotoTable extends FrameLayout { .withEndAction(new Runnable() { @Override public void run() { - mAnimating.remove(photo); - if (!mAnimating.contains(photo)) { - moveToBackground(photo); - } + mWaitingToJoinBackground.add(photo); } }); } private void moveToBackground(View photo) { - if (!isInBackground(photo)) { - removeView(photo); + if (mBackgroudOptimization && !isInBackground(photo)) { + removeViewFromParent(photo); mBackground.addView(photo, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); } } private void exitStageLeft(View photo) { - if (isInBackground(photo)) { - mBackground.removeView(photo); - } else { - removeView(photo); - } + removeViewFromParent(photo); mStageLeft.addView(photo, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); } + private void removeViewFromParent(View photo) { + ViewParent parent = photo.getParent(); + if (parent != null) { // should never be null, just being paranoid + ((ViewGroup) parent).removeView(photo); + } + } + private void moveToForeground(View photo) { - if (isInBackground(photo)) { + if (mBackgroudOptimization && isInBackground(photo)) { mBackground.removeView(photo); addView(photo, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); @@ -872,7 +910,7 @@ public class PhotoTable extends FrameLayout { } private boolean isInBackground(View photo) { - return mBackground.indexOfChild(photo) != -1; + return mBackgroudOptimization && mBackground.indexOfChild(photo) != -1; } /** wrap all orientations to the interval [-180, 180). */ @@ -883,7 +921,7 @@ public class PhotoTable extends FrameLayout { return result; } - /** Animate the selected photo to the foregound: zooming in to bring it foreward. */ + /** Animate the selected photo to the foreground: zooming in to bring it forward. */ private void pickUp(final View photo) { float photoWidth = photo.getWidth(); float photoHeight = photo.getHeight(); @@ -899,6 +937,7 @@ public class PhotoTable extends FrameLayout { log("animate it"); // lift up to the glass for a good look + mWaitingToJoinBackground.remove(photo); moveToForeground(photo); photo.animate() .withLayer() @@ -937,7 +976,7 @@ public class PhotoTable extends FrameLayout { private void recycle(View photo) { if (photo != null) { - removeView(photo); + removeViewFromParent(photo); mPhotoSource.recycle(getBitmap(photo)); } } |