Number with Comma (9,999) It's very easy if you're using Sketchware Pro. Follow this: Just go to Blocks then Operator and then scroll down and choose toDecimalFormat and then type this ###,### inside the box of toDecimalFormat while the circle is the number value If you're not using Sketchware Pro. Follow this: Go to Activity and put this code textview1.setText(new DecimalFormat("###,###").format(25)); ###,### - To make the number format like 999,999,999,999 25 - Is the value
Get X, Y Position of Layout Detect the position of layout by following the steps. Step 1: Create two number variables, I'll name it x and y Step 2: Put this code: float x = Math.round(textview1.getX()); float y = Math.round(textview1.getY()); If you want to set the X, Y position of Layout follow this additional step. Step 3: textview1.setX((float)200)); textview1.setY((float)50));
Status Bar Text Visibility The text of status bar can't see when you set your status bar color to white, so to fix it you only need this one code in your Activity. It will automatically make your status bar text visible. Codes: linear1.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
Comments
Post a Comment