Skip to content

eyeem/deviceinfo

Repository files navigation

DeviceInfo

Easy info about Android device Download

(currently) available info:

  • is7inch;
  • is10inch;
  • isPortrait;
  • isLandscape;
  • isPhone;
  • isTablet;
  • isInMultiWindowMode;
  • isInPictureInPictureMode;
  • isAmazon;
  • heightPixels;
  • heightDip;
  • widthPixels;
  • widthDip;
  • smallestWidthDp;
  • statusBarHeight;
  • navigationBarHeight;
  • diagonalScreenSize;
  • displayRealSize;
// add to your dependencies
compile 'com.eyeem.deviceinfo:library:<latest>'
// get reference to latest info using context, activity, or view
DeviceInfo di = DeviceInfo.get(context);
// or
DeviceInfo di = DeviceInfo.get(view);

// use as needed
if(di.isPortrait) {
   view.getLayoutParams.width = di.widthPixels;
}

Pull requests welcome!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages