mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2025-04-12 04:00:48 +00:00
misc: added some documentation for functions
This commit is contained in:
parent
0648e500be
commit
cf37c16557
2 changed files with 27 additions and 0 deletions
|
@ -30,10 +30,17 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
|
|||
static volatile boolean UiMenu = false;
|
||||
ImageButton btn;
|
||||
|
||||
/**
|
||||
* Get an uiMenu boolean variable
|
||||
* @return UiMenu
|
||||
*/
|
||||
public static boolean getUiMenu() {
|
||||
return UiMenu;
|
||||
}
|
||||
|
||||
/**
|
||||
* RunUI Function
|
||||
*/
|
||||
public void runUI() {
|
||||
|
||||
// Use runThread() instead ?
|
||||
|
@ -256,10 +263,20 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert pixel metrics to dp
|
||||
* @param px value of px to be converted
|
||||
* @return dp
|
||||
*/
|
||||
public static int pxToDp(int px) {
|
||||
return (int) (px / Resources.getSystem().getDisplayMetrics().density);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an image stored from Asset Dir of an App
|
||||
* @param strName name of the image to get
|
||||
* @return "resized" image
|
||||
*/
|
||||
private Bitmap getBitmapFromAsset(String strName) {
|
||||
AssetManager assetManager = getAssets();
|
||||
InputStream istr = null;
|
||||
|
|
|
@ -26,6 +26,11 @@ import cz.msebera.android.httpclient.Header;
|
|||
|
||||
public class ETLMain extends Activity {
|
||||
|
||||
/**
|
||||
* Get an splash screen image from Asset Dir of an App
|
||||
* @param strName name of the splash screen image
|
||||
* @return image
|
||||
*/
|
||||
private Drawable getSplashScreenFromAsset(String strName) {
|
||||
AssetManager assetManager = getAssets();
|
||||
InputStream istr = null;
|
||||
|
@ -41,6 +46,11 @@ public class ETLMain extends Activity {
|
|||
return etl_drawable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert pixel metrics to dp
|
||||
* @param px value of px to be converted
|
||||
* @return dp
|
||||
*/
|
||||
public static int pxToDp(int px) {
|
||||
return (int) (px / Resources.getSystem().getDisplayMetrics().density);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue