OSDN Git Service

DO NOT MERGE - Refactor preview position logic
authorDoris Liu <tianliu@google.com>
Thu, 10 Apr 2014 23:01:51 +0000 (16:01 -0700)
committerDoris Liu <tianliu@google.com>
Thu, 24 Apr 2014 02:50:56 +0000 (02:50 +0000)
commit8afc8e2eaaa4fdeef3cf9060cc69613d37804f56
treed6766e14f4b28ebd254215e145ac68316b54836f
parentbeeccf8d6193d0153a1a3f43944ebeff2c5649f7
DO NOT MERGE - Refactor preview position logic

Centralize the logic of laying out bottom bar and transforming
preview TextureView based on the total space to lay them out
and preview aspect ratio. The layout is updated when either condition
above has changed. Then the rect of the bottom bar and preview
rect can be queried anywhere. This way, bottom bar, mode options
layout, and any view that relies on the preview rect and bottom bar
rect can be laid out without extra layout passes.

Bug: 13795952
Change-Id: I13c38b566b5b5d8f37ec94f325554c089a86ca8e
(cherry picked from commit 28a2950939614a0c1c83787960ce1a218fb69a5e)
13 files changed:
res/layout/camera.xml
res/layout/generic_module.xml [deleted file]
res/layout/mode_list_layout.xml
src/com/android/camera/CaptureLayoutHelper.java [new file with mode: 0644]
src/com/android/camera/TextureViewHelper.java
src/com/android/camera/app/CameraAppUI.java
src/com/android/camera/ui/BottomBar.java
src/com/android/camera/ui/BottomBarModeOptionsWrapper.java
src/com/android/camera/ui/MainActivityLayout.java
src/com/android/camera/ui/ModeListView.java
src/com/android/camera/ui/PreviewStatusListener.java
src/com/android/camera/widget/ModeOptionsOverlay.java
src/com/android/camera/widget/SettingsButton.java [deleted file]