ELE codes page informations.pdf


Aperçu du fichier PDF elecodes-page-informations.pdf - page 2/17

Page 1 23417




Aperçu texte


TextView thecity = (TextView)findViewById(R.id.TVtipstricks);
String sujet = thecity.getText().toString();
Intent intent = new Intent(this, PageInfosActivity.class);
int color = R.color.redtips;
intent.putExtra("color",color);
intent.putExtra("uri","tips");
intent.putExtra("Sujet",sujet);
startActivity(intent);
}
private void gomuseum(){
TextView theprecolonial = (TextView)findViewById(R.id.TVmuseum);
String sujet = theprecolonial.getText().toString();
Intent intent = new Intent(this, PageInfosActivity.class);
int color = R.color.redmuseum;
intent.putExtra("color",color);
intent.putExtra("uri","museum");
intent.putExtra("Sujet",sujet);
startActivity(intent);
}
private void goevents(){
TextView theportuguese = (TextView)findViewById(R.id.TVevents);
String sujet = theportuguese.getText().toString();
Intent intent = new Intent(this, PageInfosActivity.class);
int color = R.color.redevent;
intent.putExtra("color",color);
intent.putExtra("uri","events");
intent.putExtra("Sujet",sujet);
startActivity(intent);
}
@Override
public void onBackPressed() {
super.onBackPressed();
Intent intent = getParentActivityIntent();
navigateUpTo(intent);
}
}

Xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/anthracite"
android:id="@+id/Contentinfos"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:orientation="vertical">
<TextView
android:id="@+id/titre"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/redInfo"
android:padding="5dp"
android:text="@string/infos"
android:gravity="center"
android:textAlignment="center"