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.

Start Open New Activity Android Code


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



396LW NO topic_id




AD

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


135

Draw Arc Android basic example | draw-arc-android-basic-example


drawArc(), Canvas, Paint, setStyle()

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) {

			canvas.drawColor(Color.CYAN);
			Paint p = new Paint();
			// smooths
			p.setAntiAlias(true);
			p.setColor(Color.RED);
			p.setStyle(Paint.Style.STROKE); 
			p.setStrokeWidth(5);
			// opacity
			//p.setAlpha(0x80); //
 
			RectF rectF = new RectF(50, 20, 100, 80);
			canvas.drawOval(rectF, p);
			p.setColor(Color.BLACK);
			canvas.drawArc (rectF, 90, 45, true, p);
		}

	}
}

122

Eclipse Graphical Editor does not display a xml source code - error bug | eclipse-graphical-editor-does-not-display-code-error-bug


Try this solutions:
1.) Save xml file
2.) Close tab with xml file
3.) Reopen xml file

1.) Open from menu Window->Android SDK Manager
2.) Select available updates (Tools, SDK etc.)
3.) Install updates

1.) Open from menu Help->Check for Updates
2.) Install available plugins what You need
3.) Restart Eclipse


13

Wordpress comments | wordpress-comments


Jak povolit komentáře je přihlášeným uživatelům.
Spam v komentářích je nepříjemný a zatěžuje server. Jednou z metod, jak jej omezit je povolit přidávat komentáře jen registrovaným členům. Toho ve Wordpress dosáhneme v administraci z menu Settings - Discussion kde zaškrtneme políčko Users must be registered and logged in to comment a nastaveni uložíme.
105

How to make a horizontal line in Android application example code | how-to-make-a-horizontal-line-in-android-application-example-code


In html is horizontal line a tag br. In Android source code you can use a View as xml example bellow.

<View
android:layout_width="fill_parent"
android:layout_height="4dip"
android:background="#ffffff"
android:paddingBottom="10dip"
/>
21

How to install mount SD card for Eclipse Android Emulator | how-install-sd-card-on-android-eclipse-emulator


If you want download some *.apk file from internet and try on your emulator you get error than you have to install SD card. You have to closing Android emulator.
Mount Android emulator SD card instruction

  1. In Eclipse go in menu Window - Android SDK and Avg Manager

  2. Select Virtual devices

  3. Select AVD Name where you need install SD card

  4. Click on Edit button

  5. In open dialog go to SD card - Size: and write 500

  6. Press button Edit AVD

  7. Run AVD emulator


Image how install SD card on Android emulator in Eclipse.