Permalink
Browse files

Rotation change support

  • Loading branch information...
1 parent 83071b5 commit a445cff4b8363811384f7869de4a0db3519502a6 @skarcha committed Mar 7, 2011
Showing with 8 additions and 2 deletions.
  1. +1 −1 AndroidManifest.xml
  2. +7 −1 src/com/skarcha/nobrowser/NBImageView.java
View
@@ -49,7 +49,7 @@
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
- <activity android:name="NBImageView" android:theme="@android:style/Theme.Black">
+ <activity android:name="NBImageView" android:theme="@android:style/Theme.Black" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
@@ -16,6 +16,7 @@
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
+import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
@@ -51,6 +52,12 @@ public void onCreate(Bundle savedInstanceState) {
}
}
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ //setContentView(R.layout.nbimageview);
+ }
+
private void showImage (Drawable drawable) {
ImageView imgView =(ImageView)findViewById(R.id.imageView1);
imgView.setImageDrawable(drawable);
@@ -134,5 +141,4 @@ private Drawable LoadImageFromWebOperations(String url) {
return null;
}
-
}

0 comments on commit a445cff

Please sign in to comment.