Diagonal Screen transition.

by satish bhoyar » Thu, 14 Jan 2010 01:21:51 GMT


Sponsored Links
 Hi,
I am trying to do the diagonal screen transition, & i am not able to figure
out what I should use. In my case the user should get the feel that next
screen is coming from one corner of the current screen .

Thanks,



Diagonal Screen transition.

by satish bhoyar » Thu, 14 Jan 2010 19:39:53 GMT


 Hi Guys,

I was hoping any kind of help regarding this...

please help regarding this..

Thanks
satish




>


Sponsored Links


Diagonal Screen transition.

by Sean Hodges » Thu, 14 Jan 2010 19:51:39 GMT


 As far as I'm aware, there are no diagonal screen transitions in
Android. You also can't define them per app, the activity transitions
are defined by the system theme.




>



Diagonal Screen transition.

by Justin Anderson » Thu, 14 Jan 2010 21:57:30 GMT


 You might be able to define it as a layout animation, but I have never tried
this...

So, let's say your main activity has a LinearLayout that encompasses
everything else.  You should be able to specify animations for that Layout
for when it comes on and off the screen.

Take a look at the Dev Guide where it talks about animations...




As far as I'm aware, there are no diagonal screen transitions in
Android. You also can't define them per app, the activity transitions
are defined by the system theme.

On Thu, Jan 14, 2010 at 11:39 AM, satish bhoyar <getsatonl...@gmail.com>


>



Diagonal Screen transition.

by Sean Hodges » Thu, 14 Jan 2010 22:14:32 GMT


 My understanding is that animation controllers can be applied to
layouts and views, but not whole activities.

You might be able to apply a layout animation on the root layout, and
perform a transition that appears to take up the whole screen. This
could be coupled with a screen shot of the next activity to give the
illusion that the transition is taking you to it. However, the effect
you would get is a diagonal transition, followed by the built-in
system transition (the horizontal swipe effect), which would finally
land you at the next activity.

So I think the transitions are the responsibility of the base system,
and the user-level applications have no control over them. The best
you could to is imitate them with an animation, and tell the user to
turn off the system one (Settings -> Sound & Display -> Animation);
which is not ideal.


On Thu, Jan 14, 2010 at 1:57 PM, Justin Anderson




>>



Diagonal Screen transition.

by XCaffeinated » Fri, 15 Jan 2010 09:19:27 GMT


 i Satish,

Animation between activities is indeed possible in Android 2.0 and
later, using the overridePendingTransition() API, with the caveat as
implied by Sean, that the user can override the animations if he so
wishes, in his global device settings. This API was specifically
added to give developers more control over inter-activity animations
(versus view animations which are done intra-activity).

I posted a tutorial on exactly how to use overridePendingTransition()
at anddev.org:
http://www.anddev.org/viewtopic.php?p=32766

Though the tutorial shows a fade transition between two activities, it
can easily be changed to do a diagonal transition, as per your OP: "In
my case the user should get the feel that next screen is coming from
one corner of the current screen." Here is how:

In the tutorial, replace mainfadein.xml with diagslide_enter.xml:

<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/
android"
android:fromXDelta="-100%" android:toXDelta="0%"
android:fromYDelta="-100%" android:toYDelta="0%"
android:duration="2000" />

and replace splashfadeout.xml with diagslide_leave.xml:

<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/
android"
android:fromXDelta="0%" android:toXDelta="-100%"
android:fromYDelta="0%" android:toYDelta="-100%"
android:duration="2000" />

Add diagslide_enter.xml and diagslide_leave.xml to your /res/anim
directory, and change
the overridePendingTransition() statement to:

overridePendingTransition(R.anim.diagslide_enter,
R.anim.diagslide_leave);

This will give the feel of the next screen coming from one corner,
while the previous screen leaves from the other corner.

Here's a YouTube video (forgive the quality, the emulator runs
horribly slowly on my system, but it looks terrific on the Droid):
http://www.youtube.com/watch?v=vqTbdAg_82c

If you'd rather have the next screen come from one corner, while the
previous screen stays put, do this:

overridePendingTransition(R.anim.diagslide_enter, R.anim.hold);

where hold.xml is a placeholder to keep the old activity from
disappearing too soon:

<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/
android"
android:fromXDelta="0" android:toXDelta="0"
android:duration="2000" />

If you'd rather have the next screen come from one corner over an
empty background, do this:

overridePendingTransition(R.anim.diagslide_enter, 0);

Once you get it working you should probably consider shortening the
durations, 2 seconds is kind of long.

Great info on other animation attributes is here:

http://developer.android.com/intl/zh-CN/guide/topics/resources/available-resources.html#animation

There are examples in the SDK (search *.java in the 2.X platforms for
overridePendingTransition).

I will add some of this info to the anddev tutorial, and post a
trackback.

Hope this helps!
XCaf



On Jan 8, 7:55am, satish bhoyar <getsatonl...@gmail.com



Diagonal Screen transition.

by satish bhoyar » Fri, 15 Jan 2010 13:01:17 GMT


 hanks a lot guys..
I will try this out..

Thanks,
satish

On Fri, Jan 15, 2010 at 6:49 AM, XCaffeinated <ssatn...@gmail.com> wrote:

>



Other Threads

1. Video camera record error

Hi All,

I'm trying to use USB camera on Froyo 2.2.1 . I enabled v4l driver
support in kernel .

I took v4l camera patches from x86 and applied on Froyo.

Camera is working properly ( bit slow) and able to capture images
also.

Problem is not able to record video. When i press record button in
video mode camera screen is

getting freezed and timer thread( recording duration timer) is keep on
incrementing.

One more problem is Camera/Video Camera preview frame rate is low.

Following is v4l-info of my camera :

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
        driver                  : "uvcvideo"
        card                    : "USB 2.0 Camera"
        bus_info                : "usb-0000:00:1d.7-6"
        version                 : 0.1.0
        capabilities            : 0x4000001 [VIDEO_CAPTURE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
        index                   : 0
        name                    : "Camera 1"
        type                    : CAMERA
        audioset                : 0
        tuner                   : 0
        std                     : 0x0 []
        status                  : 0x0 []

video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
        index                   : 0
        type                    : VIDEO_CAPTURE
        flags                   : 0
        description             : "YUV 4:2:2 (YUYV)"
        pixelformat             : 0x56595559 [YUYV]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
        type                    : VIDEO_CAPTURE
        fmt.pix.width           : 640
        fmt.pix.height          : 480
        fmt.pix.pixelformat     : 0x56595559 [YUYV]
        fmt.pix.field           : NONE
        fmt.pix.bytesperline    : 1280
        fmt.pix.sizeimage       : 262788743
        fmt.pix.colorspace      : SRGB
        fmt.pix.priv            : 0

controls
    VIDIOC_QUERYCTRL(BASE+0)
        id                      : 9963776
        type                    : INTEGER
        name                    : "Brightness"
        minimum                 : -128
        maximum                 : 127
        step                    : 1
        default_value           : 50
        flags                   : 0
    VIDIOC_QUERYCTRL(BASE+1)
        id                      : 9963777
        type                    : INTEGER
        name                    : "Contrast"
        minimum                 : 0
        maximum                 : 100
        step                    : 1
        default_value           : 36
        flags                   : 0
    VIDIOC_QUERYCTRL(BASE+2)
        id                      : 9963778
        type                    : INTEGER
        name                    : "Saturation"
        minimum                 : 0
        maximum                 : 100
        step                    : 1
        default_value           : 30
        flags                   : 0
    VIDIOC_QUERYCTRL(BASE+3)
        id                      : 9963779
        type                    : INTEGER
        name                    : "Hue"
        minimum                 : -20
        maximum                 : 20
        step                    : 1
        default_value           : 0
        flags                   : 0

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
        name                    : "USB 2.0 Camera"
        type                    : 0x1 [CAPTURE]
        channels                : 1
        audios                  : 0
        maxwidth                : 640
        maxheight               : 480
        minwidth                : 48
        minheight               : 32

channels
    VIDIOCGCHAN(0)
        channel                 : 0
        name                    : "Camera 1"
        tuners                  : 0
        flags                   : 0x0 []
        type                    : CAMERA
        norm                    : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
ioctl VIDIOCGAUDIO: Invalid argument

picture
    VIDIOCGPICT
        brightness              : 45746
        hue                     : 32768
        colour                  : 19661
        contrast                : 23593
        whiteness               : 0
        depth                   : 16
        palette                 : YUYV

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
    VIDIOCGWIN
        x                       : 0
        y                       : 0
        width                   : 640
        height                  : 480
        chromakey               : 0
        flags                   : 0


Please help me in resolving this issue.

Regards,
Sreenath

-- 

2. why google didn't buy skype ?

http://www.stevenlevy.com/index.php/05/10/why-google-does-not-own-skype

it's because skype is using an old technology that's incompatible with
Google advance cloud computing :p

-- 
--
Best Regards
Arianto C Nugroho
http://id.linkedin.com/in/ariantonugroho
YM-i : arianto.nugroho
skype-id : nugroho.arianto
(+254) 728 002 390
(+62) 817 9050 530

-- 
"

3. Change GPS configuration

4. Android SDK Emulator setup

5. Database corruption if I push apk again

6. Promo ZTE light tab

7. untracked pid error while booting googletv