Play Video view in full screen mode [duplicate] - android

This question already has answers here:
playback video full screen
(5 answers)
Closed 8 years ago.
In Landscape mode video view is covering 3/4 part of screen . how to make it full screen?
Thanks

If you want to play video in full screen, then just add these changes in your Androidmanifest.xml file. Just add these two lines in android manifest file:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|screenSize"
Like in my androidmanifest.xml file i have added it
<activity
android:name="com.appliconic.straminglivevideo.MainActivity"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Related

Android : Scroll Screen when keyboard showing using ConstraintLayout

I am using android.support.constraint.ConstraintLayoutwith four EditText and one Button. When clicked on First Edittext, SoftInput Keyboard visible then EditText and Button Hidden.
I tried in ManiFeast.xml
android:windowSoftInputMode="adjustResize"
android:windowSoftInputMode="adjustPan"
android:windowSoftInputMode="adjustResize|stateVisible"
But did work.
Any suggestion to make screen scrollable when not using ScrollView
its my Manifest.xml Activity tag
<application
.
.
.
<activity android:name=".MainActivity"
android:windowSoftInputMode="adjustResize|stateVisible"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
There is no way to tell when the keyboard is showing. So what you want isn't possible. What you can do is stick the whole thing in a ScrollView so its always scrollable. Then it will still be scrollable when the keyboard is up.

how to force an Android app into landscape only or portrait only? [duplicate]

This question already has answers here:
Lock screen orientation (Android) [duplicate]
(3 answers)
Closed 8 years ago.
how to force an app into landscape only or portrait only? I want to app locked into the orientation of user choices.
Thanks a lot for sharing!!
<activity android:name="Intro"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.gmaninc.package.INTRO" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
one of the following in each activity in the manifest
android:screenOrientation="portrait"
android:screenOrientation="landscape"
Follow below steps to achieve what you wanted to do..
Open Android Manifest file.
Set Orientation to Portrait or Landscape
that's it..

Push Layout for keyboard

I implemented bottom tabs in my application. One of the activities has an EditText at the middle of the screen. Pressing that field causes the screen with tabs to be pushed up. Now I fixed the layout by adding the following code to the manifest file:
android:windowSoftInputMode="adjustPan|adjustResize"
But this causes the whole activity to be fixed. Is there a way I can fix the tabs but push the activity inside it upwards for the keyboard?
Part of the Manifest File:
android:name="com.betaclassapps.ghadinews.GhadiNewsTabActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan|adjustResize"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

Downloaded .APK showing activity names at the top of the app?

I am having an android app developed and the developer sent me the .APK file so I can test the first version. I have successfully installed the .APK file on my Android device. However, when I run it, the app shows the name of each activity (with the app's logo) at the top, as shown in the following link http://www.quickid.net/activity.JPG (StackOverflow won't let me post images without a level 10 reputation). The left picture shows the MainActivity, and the right picture shows the startTrail activity. So, what's up with that? Is it some kind of test mode? How can I run the app as it would normally be run as if it were downloaded from the Play store, without it showing the activity names at the top? Also, when the app puts text in the notification bar, it says "Rolling text on statusbar" before showing the text.
That is the ActionBar, if the developer does not want to use it, he must change the default theme to Theme.Holo.NoActionBar or another that hides the action bar.
At the top of most activities is the activity's label. This is set in the App Manifest (AndroidManifest.xml). In <activity> you can add the attribute android:label.
By default it looks so:
<activity android:name=".Activity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
If you want to change the label, add a String value, and put this to android:label. If you want no label, add android:theme="#android:style/Theme.NoTitleBar". So it looks like this:
<activity android:name=".Activity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Set orientation to landscape in android on both sides [duplicate]

This question already has answers here:
How can I rotate display only in landscape mode in android?
(4 answers)
Closed 6 months ago.
I am working in an android application in 2.2 and I want to set my application in landscape mode.
For that I added in my manifest with every activity tag android:screenOrientation="landscape" and it worked fine.
But it comes only in one side. If I turn the device again upside down it fit in the same position in landscape mode. How can I have landscape mode in both the side of the device. Please help me.
Thanks in advance.
Try this
android:screenOrientation="reverseLandscape"
To get an Android application to display in landscape mode only, add this line to your Activity definition in the AndroidManifest.xml file:
android:screenOrientation="landscape"
For example, this is the definition for my main activity in the Android manifest file:
<activity
android:name=".MainActivity"
android:screenOrientation="landscape"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Using this, I think it will help you
addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChange);
function onOrientationChange(event:StageOrientationEvent):void {
trace("onOrientationChange:"+event.afterOrientation);
...and process result.
}
}

Categories

Resources