This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
public class Splash extends Activity { | |
private static final int STOPSPLASH = 0; | |
// Tempo impiegato dalla ImageView calcolato in millisecondi | |
private static final long SPLASHTIME = 3000; | |
private ImageView splash; | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<ImageView | |
android:id="@+id/splash" | |
android:layout_width="wrap_content" | |
android:layout_height="fill_parent" | |
android:src="@drawable/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends Activity { | |
private DrawerLayout mDrawerLayout; | |
private ListView mDrawerList; | |
private ActionBarDrawerToggle mDrawerToggle; | |
private CharSequence mDrawerTitle; | |
private CharSequence mTitle; | |
private String[] mGalaxyTitles; | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TextView xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@android:id/text1" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:textAppearance="?android:attr/textAppearanceListItemSmall" | |
android:gravity="center_vertical" | |
android:paddingLeft="16dp" | |
android:paddingRight="16dp" | |
android:textColor="#000" | |
android:minHeight="?android:attr/listPreferredItemHeightSmall"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
getMenuInflater().inflate(R.menu.main, menu); | |
return true; | |
} | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
switch (item.getItemId()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
<item | |
android:id="@+id/setting" | |
android:orderInCategory="100" | |
android:showAsAction="never" | |
android:title="setting"/> | |
<item | |
android:id="@+id/about" | |
android:orderInCategory="100" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...... | |
// Settare il bottone, e il suo ID | |
Button btnuno=(Button)findViewById(R.id.button1); | |
btnuno.setOnClickListener(new OnClickListener(){ | |
public void onClick(View arg0) { | |
// Settare l'intento al Click del bottone | |
Intent openPage1 = new Intent(MainActivity.this,Page1.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
<Button | |
android:id="@+id/button1" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_alignParentLeft="true" | |
android:layout_alignParentTop="true" | |
android:layout_marginLeft="99dp" | |
android:layout_marginTop="79dp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
switch (item.getItemId()) { | |
case R.id.alert: | |
alert(); | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setta Action Bar | |
ActionBar actionbar = getActionBar(); | |
// Setta il titolo | |
actionbar.setTitle("Titolo"); | |
// Setta il sottotitolo | |
actionbar.setSubtitle("Sottotitolo"); | |
// Setta una icona differente |