Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Android/java Sintassi class var = (class) getvalue()

    Ciao,
    vedo in Android una sintassi del genere
    Codice PHP:
    Button btnSave = (ButtonfindViewById(R.id.btnSave); 
    ma non è rindondante nel senso
    non si potrebbe fare lo stesso in questo modo
    Codice PHP:
    Button btnSave findViewById(R.id.btnSave); 
    nel primo caso con (Button) faccio un cast ?

    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2
    ok
    visto ora
    Codice PHP:
    View continueButton findViewById(R.id.continue_button); 
    fa proprio il casting essendo il type View
    coreggetemi se sbaglio
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.