Android Open Source - UniApp Main Activity

From Project

Back to project page UniApp.


The source code is released under:

MIT License

If you think the Android project UniApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package it.nic.uniapp;
/*from w w w  .j  a  va2  s . c  o  m*/
import it.nic.uniapp.core.PageLoader;
import it.nic.uniapp.core.PageLoader.PageType;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

public class MainActivity extends Activity {
  private PageLoader pageLoader = null;
  private TextView txtBenvenuto = null;
  private ImageView imageView1 = null;
  private ImageButton btnCalendar = null;
  private Button btnRes = null;
  private Button btnAllEsami = null;

  protected void onCreate(Bundle savedInstanceState) {
    this.pageLoader = new PageLoader();
    this.txtBenvenuto = (TextView)this.findViewById(;
    this.imageView1 = (ImageView)this.findViewById(;
    this.btnCalendar = (ImageButton)this.findViewById(;
    this.btnAllEsami = (Button)this.findViewById(;
    this.btnRes = (Button)this.findViewById(;
  private void OnClick(View view) {
    String tag = view.getTag() != null ? (String) view.getTag() : null;

    if (tag != null && tag.equals("activity_main__btnCALENDAR")) {
      pageLoader.startPageDependentActivity(this, PageType.CalendarioEsami,false, null);
    else if (tag != null && tag.equals("activity_main__btnAllEsami")){
      pageLoader.startPageDependentActivity(this, PageType.ListaEsami,false, null);
    else if (tag != null && tag.equals("activity_main__btnRES")){
      pageLoader.startPageDependentActivity(this, PageType.FunzioniEsami,false, null);

  private OnClickListener btn_OnClickListener = new OnClickListener() {
    public void onClick(View view) {


  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(, menu);
    return true;


Java Source Code List