Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

EffectHub.com: Your Best Source for Gaming
Login    or

Android:How to get the screen's dp value

DisplayMetrics metric = new DisplayMetrics();          getWindowManager().getDefaultDisplay().getMetrics(metric);          int width = metric.widthPixels;               int height = metric.heightPixels;           float density = metric.density;      //(0.75 / 1.0 / 1.5/ 2.0)          int densityDpi = metric.densityDpi;  // DPI(120 / 160 / 240)  	Log.d("SystemInfo", "Screen Height="+height+" DP="+height/density);	Log.d("SystemInfo", "Screen Width="+width+" DP="+width/density);	Log.d("SystemInfo", "densityDpi="+densityDpi);

Result:

11-04 17:26:00.965: D/SystemInfo(17416): Screen Height=1280 DP=640.011-04 17:26:00.965: D/SystemInfo(17416): Screen Width=720 DP=360.011-04 17:26:00.965: D/SystemInfo(17416): densityDpi=320


...

You must Sign up as a member of Effecthub to view the content.

1964 views    0 comments

You must Sign up as a member of Effecthub to join the conversation.

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: views/footer.php

Line Number: 6

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 21

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 85