Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Apps are not in full screen mode! Why ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Apps are not in full screen mode! Why ?

    Hi! I have the problem that my and other apps are not in full screen mode.
    I use this code to get full screen http://richwebmobile.blogspot.de/201...bar-title.html.
    It works very good on my galaxy s2 but not on my T428 Stick. Why ?
    Is it possible to get full screen without this status bar (system bar) on T428, without clicking on this icon to hide the bar?
    I'd like that the games like "Benji Bananas" always starts in full screen mode (how it is on galaxy s2).
    Is this possible !?

    #2
    AW: Apps are not in full screen mode! Why ?

    Yes it is possible you only need a different code too do it.
    Let me see we're I put it then I will postit.

    Neomode

    Gesendet von meinem GT-I9305 mit Tapatalk 2

    Comment


      #3
      Hi neomode! Have you found your code ?

      Comment


        #4
        Yes Sir here you go:

        PHP Code:
        <!-- Application theme. --><style name="AppTheme" parent="AppBaseTheme">    <item name="android:windowNoTitle">true</item>    <item name="android:windowFullscreen">true</item></style
        PHP Code:
        public class FullScreen extends Activity {
            @
        Override
            
        public void onCreate(Bundle savedInstanceState) {
                
        super.onCreate(savedInstanceState);

                
        requestWindowFeature(Window.FEATURE_NO_TITLE);
                
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN
                                        
        WindowManager.LayoutParams.FLAG_FULLSCREEN);

                
        setContentView(R.layout.main);
            }


        Comment


          #5
          I don't know why but it doesn't work! I'm using Finless ROM 1.5A. On my Galaxy S2 it works perfect, my app is always in full-screen mode but not on T428. Maybe its something with this ROM ?
          I also tried to create my own theme like this:

          styles.xml
          Code:
          <resources>
              <style name="smcFullscreen" parent="android:Theme.NoTitleBar.Fullscreen">
                  <item name="android:windowNoTitle">true</item>
                  <item name="android:windowFullscreen">true</item>
              </style>
          </resources>
          AndroidManifest.xml
          Code:
          <activity
              android:name="sput.media.center.smc_activity"
              android:label="@string/app_name"
              android:screenOrientation="landscape"
              android:theme="@style/smcFullscreen" >
              <intent-filter>
                  <action android:name="android.intent.action.MAIN" />
                  <category android:name="android.intent.category.LAUNCHER" />
              </intent-filter>
          </activity>
          smc_activity.java
          Code:
          protected void onCreate(Bundle savedInstanceState) {
                  super.onCreate(savedInstanceState);
                  requestWindowFeature(Window.FEATURE_NO_TITLE);
                  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
                  setContentView(R.layout.smc_layout);
                  ...
          }
          Why it doesn't work on T428 ?

          Comment


            #6
            What Android OS you use on SG2 and on your Device ?
            For Wicht target you compile your app ?

            Neomode

            Comment


              #7
              GS2 = CyanogenMod 4.2.2
              T428 = 4.2.2
              <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" />

              Comment


                #8
                Have you tried my BlackScreen app?

                Look here :



                and try this one :

                BlackScreen_v0.2.2.apk

                Tell me if it is fullscreen on your device.
                If it works, I can give you some information about it.

                Comment


                  #9
                  The app is really simple :
                  Here is the AndroidManifest.xml :

                  Code:
                  <?xml version="1.0" encoding="utf-8"?>
                  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                      package="petrus.tools.blackscreen"
                      android:versionCode="22"
                      android:versionName="0.2.2" >
                  
                      <uses-sdk
                          android:minSdkVersion="15"
                          android:targetSdkVersion="17" />
                  
                      <application
                          android:allowBackup="true"
                          android:icon="@drawable/sleep"
                          android:label="@string/app_name"
                          android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
                          <activity
                              android:name="petrus.tools.blackscreen.BlackScreenActivity"
                              android:label="@string/app_name" >
                              <intent-filter>
                                  <action android:name="android.intent.action.MAIN" />
                                  <category android:name="android.intent.category.LAUNCHER" />
                              </intent-filter>
                          </activity>
                      </application>
                  
                  </manifest>
                  And the activity :

                  Code:
                  package petrus.tools.blackscreen;
                  
                  import android.os.Bundle;
                  import android.view.KeyEvent;
                  import android.view.MotionEvent;
                  import android.view.View;
                  import android.view.View.OnKeyListener;
                  import android.view.View.OnTouchListener;
                  import android.app.Activity;
                  
                  public class BlackScreenActivity extends Activity implements OnKeyListener, OnTouchListener {
                  
                      @Override
                      protected void onCreate(Bundle savedInstanceState) {
                          super.onCreate(savedInstanceState);
                          setContentView(R.layout.main);
                          View view = findViewById(R.id.main_layout);
                          view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.STATUS_BAR_HIDDEN);
                          view.setOnKeyListener(this);
                          view.setOnTouchListener(this);
                          view.setFocusableInTouchMode(true);
                          view.requestFocus();
                      }
                  
                      @Override
                      public boolean onKey(View v, int keyCode, KeyEvent event) {
                          finish();
                          return true;
                      }
                  
                      @Override
                      public boolean onTouch(View v, MotionEvent event) {
                          finish();
                          return true;
                      }
                  }

                  Comment

                  Working...
                  X