Android Open Source - DtuExamTools Notes And Papers






From Project

Back to project page DtuExamTools.

License

The source code is released under:

RECEX SHARED SOURCE LICENSE version 1.0, 30 May 2013 Copyright (c) 2013 RecEx. <http://recex.co.in> Everyone is permitted to copy and distribute verbatim copies of this license docum...

If you think the Android project DtuExamTools 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

/**********************************************************************
    RecEX DTU Exam  Tools//from   w  w  w.  j ava  2s  .  c o m
    Copyright (C) 2013  RecEx

The source code of this program is shared under the RECEX
SHARED SOURCE LICENSE (version 1.0).

The source code is shared for referrence and academic purposes
with the hope that people can read and learn from it. This is not
Free and Open Source software, and code is not redistributable
without permission of the author. Read the RECEX SHARED
SOURCE LICENSE for details 

The source codes does not come with any warranty including
the implied warranty of merchandise. 

You should have received a copy of the RECEX SHARED SOURCE
LICENSE in the form of a License.txt file in the root of the source
directory. If not, please refer to 
<https://raw.github.com/Recex/Licenses/master/SharedSourceLicense/LICENSE.txt>
**********************************************************************/
package com.RecEx.dtuexamtools;


import java.util.ArrayList;

import com.google.analytics.tracking.android.EasyTracker;
import com.google.analytics.tracking.android.GoogleAnalytics;
import com.google.analytics.tracking.android.Tracker;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.GridView;
import android.widget.Toast;

public class NotesAndPapers extends Activity implements OnClickListener {
  
  private ArrayList<Button> mButtons = new ArrayList<Button>();
  String group;
  private Tracker mGaTracker;
    private GoogleAnalytics mGaInstance;
  
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        mGaInstance = GoogleAnalytics.getInstance(this);
        mGaTracker = mGaInstance.getTracker("UA-40877184-1");


        Bundle extras = getIntent().getExtras();
        if (extras != null) {
            group = extras.getString("Group");
        }
        
        createButton("Previous Years Papers");
        createButton("Notes to study");
        
        GridView gridView = (GridView) findViewById(R.id.gridview);
        gridView.setAdapter(new CustomAdapter(mButtons));
        
    }
    

  private void createButton(String string) {
    // TODO Auto-generated method stub
        Button cb = null;
        cb = new Button(this);
      cb.setText(string);
      cb.setBackgroundResource(R.drawable.fancy_button_selector);
      cb.setOnClickListener(this);
      registerForContextMenu(cb);
      mButtons.add(cb);
  }

  @Override
  public void onClick(View v) {
    Button selection = (Button)v;
    Toast.makeText(getBaseContext(),  selection.getText()+ " was pressed!", Toast.LENGTH_SHORT).show();
    if(selection.getText()=="Notes to study"){
    Intent i = new Intent(getApplicationContext(), Subjects.class);
    i.putExtra("Group",group);
    startActivity(i);
    }
    
    if(selection.getText()=="Previous Years Papers"){
      Intent i = new Intent(getApplicationContext(), MidSemEndSem.class);
      startActivity(i);
    }
  }
  @Override
   public void onStart() {
        super.onStart();
         // The rest of your onStart() code.
        EasyTracker.getInstance().activityStart(this); // Add this method.

      }
   
    @Override
    public void onStop() {
      super.onStop();
      // The rest of your onStop() code.
      EasyTracker.getInstance().activityStop(this); // Add this method.
    }
    
}




Java Source Code List

com.RecEx.dtuexamtools.AboutUs.java
com.RecEx.dtuexamtools.CustomAdapter.java
com.RecEx.dtuexamtools.Groups.java
com.RecEx.dtuexamtools.MidSemEndSem.java
com.RecEx.dtuexamtools.NotesAndBooks.java
com.RecEx.dtuexamtools.NotesAndPapers.java
com.RecEx.dtuexamtools.Splash.java
com.RecEx.dtuexamtools.Subjects.java
com.RecEx.dtuexamtools.databaseDialog.java