CSS circle style html
- create div with class with name e.g. circle
- create in styleSheet.css class circle
html code
<div class="circle" id="">3</div>
css code
.circle {
border-radius: 50%;
width: 50px;
height: 50px;
background: yellow;
position: absolute;
display: block;
border: 6px solid blue;
font-size: 50px;
text-align: center;
}
3
396LW NO topic_id
AD
Další témata ....(Topics)
Eclipse Navigation Shortcuts.
Keyboard_shortcuts_(3.0).pdf
Ctrl+1 Quick fix problem
Ctrl+O Quick Outline
Ctrl+Shift+G Find references in workspace
Ctrl+Shift+U Find all references in file
Ctrl+Shift+T Find Java Typ
[caption id="attachment_1214" align="alignleft" width="150" caption="eclipse-ctrl-shift-t"]
[/caption]
Ctrl+Shift+R Find Resource
Ctrl+E Open Editor Drop-Down
Ctrl+Space Content Assist
Ctrl+Shift+Space Context Information
F3 Open Declaration of variable
F4 Open Type Hierarchy
Ctrl+H Open Search Dialog
Alt+Shift+R Rename - Refactoring
Alt+Shift+M Extract Method
Alt+Shift+L Extract Local Variable
Alt Shift Up Expand selection to enclosing element
Alt Shift Right Expand selection to next element
Alt Shift Left Expand selection to previous element
Alt Shift Down Restore previous selection
Breakpoints Shift+Alt+Q B
Cheat Sheets Shift+Alt+Q H
Console Shift+Alt+Q C
Java Declaration Shift+Alt+Q D
Java Package Explorer Shift+Alt+Q P
Java Type Hierarchy Shift+Alt+Q T
Javadoc Shift+Alt+Q J
Search Shift+Alt+Q S
Show View (View: Outline)Shift+Alt+Q O
Show View (View: Problems)Shift+Alt+Q X
Synchronize Shift+Alt+Q Y
Variables Shift+Alt+Q V

Keyboard_shortcuts_(3.0).pdf
Ctrl+1 Quick fix problem

Ctrl+O Quick Outline

Ctrl+Shift+G Find references in workspace
Ctrl+Shift+U Find all references in file

Ctrl+Shift+T Find Java Typ
[caption id="attachment_1214" align="alignleft" width="150" caption="eclipse-ctrl-shift-t"]

Ctrl+Shift+R Find Resource

Ctrl+E Open Editor Drop-Down
Ctrl+Space Content Assist

Ctrl+Shift+Space Context Information

F3 Open Declaration of variable
F4 Open Type Hierarchy
Ctrl+H Open Search Dialog
Alt+Shift+R Rename - Refactoring
Alt+Shift+M Extract Method
Alt+Shift+L Extract Local Variable
Alt Shift Up Expand selection to enclosing element
Alt Shift Right Expand selection to next element
Alt Shift Left Expand selection to previous element
Alt Shift Down Restore previous selection
Breakpoints Shift+Alt+Q B
Cheat Sheets Shift+Alt+Q H
Console Shift+Alt+Q C
Java Declaration Shift+Alt+Q D
Java Package Explorer Shift+Alt+Q P
Java Type Hierarchy Shift+Alt+Q T
Javadoc Shift+Alt+Q J
Search Shift+Alt+Q S
Show View (View: Outline)Shift+Alt+Q O
Show View (View: Problems)Shift+Alt+Q X
Synchronize Shift+Alt+Q Y
Variables Shift+Alt+Q V

Rotate a bitmap Android source code.

public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static class SampleView extends View {
// CONSTRUCTOR
public SampleView(Context context) {
super(context);
setFocusable(true);
}
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
canvas.drawColor(Color.YELLOW);
// Bitmap b = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888);
// you need to insert a image flower_blue into res/drawable folder
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.flower_blue);
Matrix mat = new Matrix();
mat.postRotate(90);
Bitmap bmpRotate = Bitmap.createBitmap(bmp, 0, 0,
bmp.getWidth(), bmp.getHeight(),
mat, true);
int h = bmp.getHeight();
canvas.drawBitmap(bmp, 10,10, paint);
canvas.drawBitmap(bmpRotate, 10,10 + h + 10, paint);
}
}
}

How to resize an image in ImageView Android source code.
Resize imageview layout and image will resize too:
Resize imageview layout and image will resize too:
public void resizeImageView(int width, int height) {
final ImageView picture1 = (ImageView)findViewById(R.id.imageView1);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(width, height);
picture1.setLayoutParams(layoutParams);
}
FLAG_KEEP_SCREEN_ON saving energy. Protects the battery if a user closing applications using the Return button on device. The device will returned to user screen mode settings.
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
//..........
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
The exact physical pixels per inch of the screen
Get size of pixel
Get DPI
Get count of pixels per inch
Get size of pixel
Get DPI
Get count of pixels per inch
float mXDpi;
float mYDpi;
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
mXDpi = metrics.xdpi; // The exact physical pixels per inch of the screen in the X dimension.
mYDpi = metrics.ydpi;
float mMetersToPixelsX = mXDpi / 0.0254f; // 1 inch == 0.0254 metre
float mMetersToPixelsY = mYDpi / 0.0254f;
Editace: 2017-10-25 10:45:40
Počet článků v kategorii: 396
Url:css-circle-style-html