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.

Android Google Maps Night Mode


AD MOB

If you want save battery, select "Satelite map" from map menu and reduce the brightness of the display.

android-google-maps-night-mode-as-satelite-map.jpg

397LW NO topic_id




AD

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


279

Start Open New Activity Android Code | start-open-new-activity-android-code



      Intent i = new Intent(this, MyNextClass.class);
      startActivity(i);


151

Bitmap Canvas Color Gradient linear radial sweep rounded corner Android example | bitmap-canvas-color-gradient-linear-radial-sweep-rounded-corner-android-example



public class MainActivity extends Activity {
//  //www.apache.org/licenses/LICENSE-2.0
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(new SampleView(this));
	}

	   private static class SampleView extends View {
	        private Rect    mRect;
	        private GradientDrawable mDrawable;

	        public SampleView(Context context) {
	            super(context);
	            setFocusable(true);

	            mRect = new Rect(0, 0, 220, 120);
	      
/*	            GradientDrawable.Orientation  BL_TR  draw the gradient from the bottom-left to the top-right   
	              BOTTOM_TOP  draw the gradient from the bottom to the top   
	              BR_TL  draw the gradient from the bottom-right to the top-left   
	              LEFT_RIGHT  draw the gradient from the left to the right   
	              RIGHT_LEFT  draw the gradient from the right to the left   
	              TL_BR  draw the gradient from the top-left to the bottom-right   
	              TOP_BOTTOM  draw the gradient from the top to the bottom   
	              TR_BL  draw the gradient from the top-right to the bottom-left   
*/
	            
	            mDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT,
	                                             new int[] { 0xFFFF0000, 0xFF00FF00,
	                                                 0xFF0000FF });
	            mDrawable.setShape(GradientDrawable.RECTANGLE);
	            mDrawable.setGradientRadius((float)(Math.sqrt(2) * 60));
	        }
	        
	        static void setCornerRadius(GradientDrawable drawable, float r0,
	                                   float r1, float r2, float r3) {
/*	        	setCornerRadii
	        	Specify radii for each of the 4 corners. For each corner, 
	        	the array contains 2 values, [X_radius, Y_radius]. 
	        	The corners are ordered top-left, top-right, bottom-right, 
	        	bottom-left 
*/
	            drawable.setCornerRadii(new float[] { r0, r0, r1, r1,
	                                                  r2, r2, r3, r3 });
	        }
	        
	        @Override protected void onDraw(Canvas canvas) {
	            
	            mDrawable.setBounds(mRect);

	            float r = 35;
	            
	            canvas.save();
	            canvas.translate(10, 10);
	            mDrawable.setGradientType(GradientDrawable.LINEAR_GRADIENT);
	            setCornerRadius(mDrawable, r, r, 0, 0);
	            mDrawable.draw(canvas);
	            canvas.restore();
	            
	            canvas.translate(0, mRect.height() + 10);
	            canvas.save();
	            canvas.translate(10, 10);
	            mDrawable.setGradientType(GradientDrawable.RADIAL_GRADIENT);
	            setCornerRadius(mDrawable, 0, 0, r, r);
	            mDrawable.draw(canvas);
	            canvas.restore();
	            
	            canvas.translate(0, mRect.height() + 10);
	            canvas.save();
	            canvas.translate(10, 10);
	            mDrawable.setGradientType(GradientDrawable.SWEEP_GRADIENT);
	            setCornerRadius(mDrawable, 0, r, r, 0);
	            mDrawable.draw(canvas);
	            canvas.restore();
	            
	            
	        }
	    }
	}


gradient-bitmap-rounded
39

How setup color coloring syntax code highlight highlighting in Eclipse editor Android example | how-setup-color-syntax-highlight-in-eclipse-android-example


How setup color coloring highlight highlighting syntax font size and family in Eclipse Java and XML editor Android example
Java editor

  1. Go to Eclipse menu Window -> Preferences

  2. Doubleclick on Java

  3. Double click on Editor

  4. Select Java, Javadocs or Comments and setup color and font

  5. Font size and family change from Window->Preferences-> General->Appearance->Colors and Fonts


  6. Press OK for saving changes


xml editor
xml editor double click in Preferences dialog on xml -> Editor -> Syntax coloring
[caption id="attachment_627" align="alignleft" width="297" caption="Eclipse editor syntax color settings"]eclipse-color-syntax-highlight-settings[/caption]
46

How get versionName package name versionCode minSdkVersion Android example | how-get-versionname-package-name-versioncode-android-example


How get application version, sdk version, package name defined in the AndroidManifest file programmically Android sample.

MainClass.java onCreate()

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
			setContentView(R.layout.main);

         // in onCreate
         PackageInfo pinfo = this.getPackageManager().getPackageInfo(getPackageName(), 0);
         String sVersionCode = pinfo.versionCode; // 1
         String sVersionName = pinfo.versionName; // 1.0
         String sPackName = getPackageName(); // cz.okhelp.my_app
         int nSdkVersion = Integer.parseInt(Build.VERSION.SDK); // 7
         int nSdkVers = Build.VERSION.SDK_INT; // 7

       }



AndroidManifes.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="//schemas.android.com/apk/res/android"
      package="cz.okhelp.my_app"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="7" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".Add_view_to_tableActivity"
                  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>
</manifest>

202

Samsung Galaxy Mini (S5570) | samsung-galaxy-mini-s5570






























Brand Samsung
Model (codename) Galaxy Mini (S5570)
Price (cena, včetně DPH) 3500 / 06.2012
Display size in Inch (v palcích) 3.14
Display-resolution 240x320
Dotek-typ kapacitní
CPU typ MSM7227
CPU MHz 600
CPU core
L2 cache yes
RAM 256
ROM 512
GPU Adreno 200
NenaMark2 Benchmark
GPU-GLBenchmark
Baterie mAh 1200
Foto MPx 3
Autofocus no
Video QVGA (320 x 240) při 15 frames/s
Official Android ICS Android Froyo 2.2
CyanogenMod support yes
Dotek-prstů-max Dual-touch (two fingers)
Display-ppi 127
Display-retina 39%
Networks GSM&EDGE (850 / 900 / 1.800 / 1.900 MHz) 3G (900 / 2.100 MHz)
Connectivity Bluetooth V2.1 , USB V2.0 , USB mass storage , SyncML(DM) , WIFI , AGPS, 3.5 mm jack
Note


Samsung S5570 Galaxy Mini - image
samsung-s5570-galaxy-mini


Editace: 2015-12-05 12:16:39
Počet článků v kategorii: 397
Url:android-google-maps-night-mode

AD
11 Share
Share
Tweet