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.

Delete Canvas - Fill Canvas Android example


Fill the entire canvas with the specified color.

@Override
    public void onDraw(Canvas canvas) {
    canvas.drawColor(Color.GREEN);
}

397LW NO topic_id



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


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]
219

Throwing multiple exceptions Java | throwing-multiple-exceptions-java


Throws multiple exceptions Java example source code

	public void callFc() 
	throws IndexOutOfBoundsException, ArithmeticException
	{
         // my code for example:
         String[] sArray = {"aa","bb"};
         String str = sArray[5]; // IndexOutOfBoundsException

         int n = 5 / 0; // ArithmeticException
        }

public void someFC (){
try{
     callFc();
    }
 catch(IndexOutOfBoundsException e){
      Log.e("TAG", e.toString());
  }
 catch(ArithmeticException e2){ 
      Log.e2("TAG",e2.toString()); 
  }
}

271

Eclipse - How open deleted project from workspace | eclipse-how-open-deleted-project-from-workspace


If project is in workspace and only not visible in project explorer using this:



Click on some project in project explorer
Menu:
File
Import project
Existing Projects into Workspace


26

Get package name Context-getPackageName Android example | get-package-name-context-getpackagename-android-example


If you often copy your Android project to another you have to using function for obtaining varied information about package.
This code show how get package name in Android application as string:

Context context = getContext(); // this.getContext(); getApplicationContext(); etc.
String sPackName = context.getPackageName();

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]


Editace: 2013-12-09 13:04:00
Počet článků v kategorii: 397
Url:delete-canvas-fill-canvas-android-example
Share
Share
Tweet