diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index d3c4522d..bff44fdc 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -17,6 +17,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.database.sqlite.SQLiteDatabase; import android.graphics.BitmapFactory; +import android.graphics.Point; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; @@ -579,5 +580,13 @@ public class CommonActivity extends AppCompatActivity implements SharedPreferenc public static void requestWidgetUpdate(Context context) { JobIntentService.enqueueWork(context.getApplicationContext(), WidgetUpdateService.class, 0, new Intent()); } + + public int getScreenWidth() { + Display display = getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getSize(size); + + return size.x; + } } |