Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

Screen size density independent pixel resolution


AD MOB

Terms Screen size, density, density independent pixel, resolution as a picture - pictogram.
mobile-phone-screen-resolution-terms

Test your knowledge
Q: How to find out the phone screen size?
A: (By length of display diagonale in inch -  Not to measure a diagonal of device!!!)

Q: What resolution has 720 x 1280 display?
A: (921600 pixels)

Q: What does it mean "240 dpi" screen density?
A: (Display have density 240 x 240  dots - "Tri-color LED etc." - per every physical (real) square inch. If you have icon 240x240 pixels, this will just occupy an area of one square inch on the display.)

Q: Phone have screen density 240 dpi. Image for 160 dpi screen density have size 128x 128 pixels. What will be the size of the image for 240 dpi screen density?
A: (Calculate the virtual pixels size.   128 * (240/160)  =  192.  You have to resize image to new size 192 x 192 physical pixels and put into folder drawable-hdpi (high) ~240dpi  for phone with screen density 240 dpi. ) or use density independend pixels 128dp x 128dp.

 

 

397LW NO topic_id




AD

Další témata ....(Topics)


349

Android Studio bug versioncode versionname signed apk issue | android-studio-bug-versioncode-versionname-signed-apk-issue


If you change android:versionCode="224" and android:versionName="2.2.4" in AndroidManifest.xml you have to change this in build.gradle file too.
Click on build.gradle in package explorer tree change your new version name and code:


  defaultConfig {
        applicationId "cz.okhelp.pocasiwidget"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 224
        versionName "2.2.4"
    }
60

Get all ID from xml file for Android developers utility | get-all-id-from-xml-file-for-android-developers-utility


This software allow find all IDs from xml layout file source code and create variables with findViewById for onCreate, for onClick and load save preferences functions.
Get all ID is for Windows XP and higher.

2017,04,28
Download 1.0.2.0

[caption id="attachment_903" align="alignleft" width="300" caption="Get all ID from xml file for Android developers utility."]get-all-id-from-xml-file-android[/caption]
225

Eclipse custom skin GUI color theme | eclipse-custom-skin-gui-color


Eclipse make own color of toolbars, windows, status bar etc.
https://github.com/jeeeyul/eclipse-themes/wiki/Alternative-Install

eclipse-custom-skin-gui-2.jpg

eclipse-custom-skin-gui.png
172

Android Samples | android-samples











AbsListView
AbstractAccountAuthenticator
AbstractThreadedSyncAdapter
AccelerateInterpolator
AccessibilityEvent
AccessibilityService
AccessibilityServiceInfo
Account
AccountAuthenticatorActivity
AccountAuthenticatorResponse
AccountManager
Activity
ActivityInfo
ActivityInstrumentationTestCase2
ActivityManager
ActivityUnitTestCase
AdapterContextMenuInfo
AdapterView
AlarmManager
AlertDialog
AlphaAnimation
AndroidTestCase
Animation
AnimationSet
AnimationUtils
Application
ApplicationTestCase
AppWidgetManager
AppWidgetProvider
ArrayAdapter
AssetFileDescriptor
AsyncTask
AttributeSet
AudioManager
AuthenticatorDescription
AuthenticatorException
AutoCompleteTextView
BackupAgent
BackupAgentHelper
BackupDataInput
BackupDataOutput
BackupManager
BaseAdapter
BaseColumns
BaseExpandableListAdapter
Binder
Bitmap
BitmapDrawable
BitmapFactory
BitmapShader
BluetoothAdapter
BluetoothDevice
BluetoothServerSocket
BluetoothSocket
BroadcastReceiver
Build
Bundle
Button
Callback
Camera
CameraInfo
Canvas
Color
ColorFilter
CompletionInfo
ComponentName
CompoundButton
ConditionVariable
Config
ConfigurationInfo
Contacts
ContactsContract
ContentProvider
ContentProviderClient
ContentProviderOperation
ContentResolver
ContentUris
ContentValues
Context
ContextMenu
ContextMenuInfo
Cursor
CursorAdapter
Data
DatePicker
DatePickerDialog
DecelerateInterpolator
DeviceAdminReceiver
DevicePolicyManager
Dialog
DialogInterface
Display
DisplayMetrics
Drawable
Editable
EditorInfo
EditText
EditTextPreference
Email
Environment
Equalizer
ETC1Util
ExpandableListActivity
ExpandableListAdapter
ExpandableListContextMenuInfo
ExpandableListView
FileBackupHelper
FillType
Filterable
FloatMath
FocusFinder
FormatException
Gallery
Gesture
GestureDetector
GestureLibraries
GestureLibrary
GestureOverlayView
GLES10
GLES20
GLSurfaceView
GLU
GLUtils
Gravity
GridView
Handler
HandlerThread
Html
CharArrayBuffer
CheckBox
CheckBoxPreference
Chronometer
IBinder
Im
ImageButton
ImageSwitcher
ImageView
InputConnection
InputMethodManager
InputMethodService
Instrumentation
Intent
IntentFilter
JetPlayer
Key
Keyboard
KeyboardView
KeyEvent
KeyCharacterMap
LayoutAnimationController
LayoutInflater
LayoutParams
LinearLayout
LinkMovementMethod
ListActivity

ListAdapter
ListPreference
ListView
LiveFolders
Log
Looper
Matrix
MediaController
MediaPlayer
MediaScannerConnection
MediumTest
Menu
MenuInflater
MenuItem
Message
Messenger
MetaKeyKeyListener
MoreAsserts
MotionEvent
MovementMethod
MultiAutoCompleteTextView
NameNotFoundException
NdefMessage
NdefRecord
NfcAdapter
Notification
NotificationManager
OnAccountsUpdateListener
OnBufferingUpdateListener
OnClickListener
OnCompletionListener
OnCheckedChangeListener
OnInitListener
OnItemClickListener
OnItemSelectedListener
OnJetEventListener
OnKeyListener
OnPreparedListener
OnScrollListener
OnSharedPreferenceChangeListener
OnTouchListener
OnVideoSizeChangedListener
OperationApplicationException
OperationCanceledException
Options
PackageInfo
PackageManager
Paint
PaintDrawable
PaintFlagsDrawFilter
Parcel
Parcelable
ParcelFileDescriptor
Path
PendingIntent
People
Phone
Phones
Picture
PictureDrawable
PixelFormat
PorterDuff
PorterDuffXfermode
PowerManager
Preference
PreferenceActivity
PreferenceCategory
PreferenceManager
PreferenceScreen
Process
ProgressBar
ProgressDialog
QuickContactBadge
RadioButton
RadioGroup
RatingBar
RawContacts
RecognitionService
RecognizerIntent
Rect
RectF
RelativeLayout
RemoteCallbackList
RemoteException
RemoteViews
ResolveInfo
ResourceCursorAdapter
Resources
Row
ScaleGestureDetector
ScrollingMovementMethod
ScrollView
SearchManager
SearchRecentSuggestions
SearchRecentSuggestionsProvider
SeekBar
Sensor
SensorEvent
SensorEventListener
SensorManager
Service
ServiceConnection
ServiceTestCase
Shader
ShapeDrawable
SharedPreferences
SimpleAdapter
SimpleCursorAdapter
SimpleCursorTreeAdapter
SimpleExpandableListAdapter
Size
SmallTest
SmsManager
SmsMessage
SpannableString
Spanned
SparseArray
SpeechRecognizer
Spinner
SpinnerAdapter
SQLException
SQLiteDatabase
SQLiteOpenHelper
SQLiteQueryBuilder
StatusUpdates
StructuredName
Style
StyleSpan
Surface
SurfaceHolder
SurfaceView
SyncResult
SystemClock
TabActivity
TabHost
TableLayout
TableRow
TabSpec
TestSuiteBuilder
TextSwitcher
TextToSpeech
TextUtils
TextView
TextWatcher
Time
TimePicker
TimePickerDialog
Toast
ToggleButton
Transformation
TranslateAnimation
TypedArray
Typeface
UiThreadTest
Uri
UriMatcher
URLSpan
Vibrator
VideoView
View
ViewFlipper
ViewGroup
ViewParent
ViewSwitcher
Visualizer
WakeLock
WallpaperManager
WallpaperService
WebView
Window
WindowManager
Xfermode
Xml
XmlResourceParser

210

No Launcher activity found Android Emulator Error | no-launcher-activity-found-android-emulator-error


Error: No Launcher activity found!
The launch will only sync the application package on the device!
Android emulator not showing the app
Workaround:
Check AndroidManifest.xml for MAIN and LAUNCHER. MyActivity.java is first Activity what will opened if .apk is installed.

<application android:label="@string/app_name" android:icon="@drawable/icon">
    <activity android:name="MyActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>


Editace: 2015-11-29 12:26:12
Počet článků v kategorii: 397
Url:screen-size-density-independent-pixel-resolution

AD
11 Share
Share
Tweet