5

Currently, when you connect an external monitor to an Android phone that supports mirroring, the phone makes the assumption that the external monitor is set up in a landscape orientation. Thus, when the phone is held vertically (in this case, the Galaxy S III) in a portrait orientation, the video output on the display is portrait, but centered with black bars on either side. Of course, when the phone is held horizontally, the output fills the external display.

What I'm looking for is a way to force the Galaxy S III to mirror its screen such that when it is held in a portrait orientation, the output will fill the external display. It would have to work across Android - I'm not talking about a specific app in particular, it needs to work consistently across all apps.

The external display would be mounted vertically, so it's essential that the output from the Galaxy S III while in portrait orientation completely fills and has the correct orientation on the external display.

Can anyone give me any advice on where to begin? I've already looked through the source code for the S III and haven't been able to find any clues (I'm not experienced in writing my own drivers on Android). This would be for the US variants (specifically Verizon, though the video hardware - Adreno 225 GPU and SiI9234 MHL controller chip - is the same across all US variants). Perhaps someone who is more experienced in that field could shed some light on this.

Eric Ahn
  • 716
  • 1
  • 5
  • 15

1 Answers1

3

Unfortunately that is not possible. you would have to develop your app in landscape mode and then rotate all your views/content to make it seem it is in vertical portrait mode. One option for that would be animations. ie:

rotateAnimation.xml:

<rotate  xmlns:android="http://schemas.android.com/apk/res/android"
       android:fromDegrees="0" 
       android:toDegrees="-90"
       android:pivotX="50%"
       android:duration="0"
       android:fillAfter="true" />

Your Code:

  TextView text = (TextView)findViewById(R.id.txtview);       
  text.setText("rotated text here");

  RotateAnimation rotate=    (RotateAnimation)AnimationUtils.loadAnimation(this,R.anim.rotateAnimation);
t.setAnimation(rotate);

Also you can have a look at this post:

Vertical (rotated) label in Android

Community
  • 1
  • 1
SunnySonic
  • 1,318
  • 11
  • 37