Twise Random

A site about computer science .
Skip to content
  • apple
  • android
  • c
  • cpp
  • data structure and algorithms
  • macos
  • python
  • tutorials

Category: android

Android services a tutorial

Posted on February 16, 2021February 20, 2021 by mohamad wael

 

What is a service

A service is simply code which is running , and this code , does not have a GUI . The code runs , on the main thread of its application (hosted process) , unless the … Read More

android tutorial

How to set line height in android studio ?

Posted on February 14, 2021February 24, 2021 by mohamad wael

 
To set line spacing in android studio , go to Android Studio , then preferences , Control+Alt+S for windows , or Command+, (comma) for macOS , next select editor , font , and from there set the line spacing … Read More

android

The DisplayMetrics class in android a tutorial

Posted on October 18, 2019October 29, 2020 by mohamad wael

What is the DisplayMetrics class ?

The DisplayMetrics class is used to get various information about the screen in android .The information that we can get are the following :

  • DENSITY_DEVICE_STABLE : The density of the device in ppi read
… Read More
util densityDpi, scaledDensity

Screen measurement in android

Posted on October 14, 2019October 29, 2020 by mohamad wael

Screen measurement

What is Screen size ?

A smartphone , has a width and a height which can be expressed in inches . The screen size is the length of the diagonal of the smartphone , and which can be … Read More

android aspect ratio, density, dp, orientation, sp
2

Bitmap in android a tutorial ?

Posted on September 17, 2019October 29, 2020 by mohamad wael

What is bitmap ?

A bitmap is an object , which is an instance of the Bitmap Class. This class represents a 2d coordinate system . The coordinate system move to the right on the x axis , and to … Read More

graphics
1

Color in android a tutorial

Posted on August 28, 2019October 29, 2020 by mohamad wael

what is Light ?

A light is a wave which doesn’t need a medium to propagate . Other examples of waves are water waves , or air waves which need water and air as a medium to propagate .Water , … Read More

graphics android color, color instance, int color, long color

What is the addView method in android ?

Posted on August 8, 2019August 27, 2021 by mohamad wael

The addView method, is used to add a View programmatically to a ViewGroup. A ViewGroup can be for example, a LinearLayout, or a RelativeLayout.. A ViewGroup is itself a View. The addView method is overloaded.

The… Read More

viewgroup