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.

Include xml into another xml Android Example


AD MOB

How include layout defined in other xml file into another xml file example:
res/layout/my_layout.xml into
main.xml

<include  layout="@layout/my_layout" android:id="@+id/idMyLayout" />

397LW NO topic_id




AD

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


322

View overrides onTouchEvent but not performClick | view-overrides-ontouchevent-but-not-performclick



public class Panel extends SurfaceView implements SurfaceHolder.Callback {
//............... code
//............... some code
   /**
     * Process the MotionEvent.
     */
    @Override
    public boolean onTouchEvent(MotionEvent event) {
    	
        synchronized (getHolder()) {
            if (event.getAction() == MotionEvent.ACTION_DOWN) {
            	performClick();
             } else if (event.getAction() == MotionEvent.ACTION_MOVE) {
            	if(_currentGraphic==null)return true;
                
            } else if (event.getAction() == MotionEvent.ACTION_UP) {
            }
            return true;
        }
    }
/////////////////////////////
 @Override
 public boolean performClick() {
  // Calls the super implementation, which generates an AccessibilityEvent
        // and calls the onClick() listener on the view, if any
        super.performClick();

        // Handle the action for the custom click here

        return true;
 }

}

241

Dialog With RadioButton Android Example | dialog-with-radiobutton-android-example



private void dialogModeFC() {
	try {
	final AlertDialog alertDialog =	new AlertDialog.Builder(MainActivity.this)
    .setTitle(R.string.select_dialog)
    //.setItems(
    .setSingleChoiceItems(R.array.select_dialog_items, -1
    		, new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {

        /* User clicked so do some stuff 
        <item>Happy New Year</item>
        <item>Merry Christmas</item>
        <item>I Love You</item>
        */
            String[] items = getResources().getStringArray(R.array.select_dialog_items);
// list with boolean variables - which is true
//            for (int i = 0; i < _listMode.size(); i++) {
//            	_listMode.set(i, false);
//            }
//            _listMode.set(which, true);
            dialog.dismiss();
//            new AlertDialog.Builder(MainActivity.this)
//                    .setMessage("You selected: " + which + " , " + items[which])
//                    .show();
        }
    })
    .create();
	alertDialog.show();
	} catch (Exception e) {
		e.printStackTrace();
		Toast.makeText(getApplicationContext(), e.getMessage().toString(), Toast.LENGTH_LONG)
				.show();//("dialogModeFC", e.getMessage().toString());
	}
}// end dialogModeFC	
200

Samsung i9250 Galaxy Nexus | samsung-i9250-galaxy-nexus






























Brand Samsung
Model (codename) i9250 Galaxy Nexus
Cena, včetně DPH 9000
Veikost Displaye v palcích 4.65
Display-resolution 1280x720
Dotek-typ kapacitní
CPU typ
CPU MHz 1200
CPU core 2
L2 cache
RAM 1 GB
ROM 16 - 32 GB
GPU TI OMAP 4460 1,2 GHz dual-core
NenaMark2 Benchmark
GPU-GLBenchmark
Baterie mAh 1750
Foto MPx 5
Autofocus yes
Video 480p - 30 frames/s
Official Android ICS Android 4.0 Ice Cream Sandwich
CyanogenMod support
Dotek-prstů-max
Display-ppi
Display-retina
Network GSM&EDGE: 850 / 900 / 1.800 / 1.900
Connectivity
Pozn.


samsung-i9250-galaxy-nexus image
samsung-i9250-galaxy-nexus
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
169

Iterate HashMap getKey getValue Java Example | iterate-hashmap-getkey-getvalue-java-example



 HashMap<String,Locale> _mapOfLocale = new HashMap<String,Locale>();
    _mapOfLocale.put("French",Locale.	FRENCH	);	
    _mapOfLocale.put("German",Locale.	GERMAN	);	
    _mapOfLocale.put("Italian",Locale.	ITALIAN	);	

    for (Entry<String, Locale> entry : _mapOfLocale.entrySet()) {

       System.out.println(entry.getKey());
       System.out.println(entry.getValue());

      }





Editace: 2013-01-06 10:41:45
Počet článků v kategorii: 397
Url:include-xml-into-another-xml-android-example

AD
11 Share
Share
Tweet