TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

Atps de Android

Por:   •  1/6/2016  •  Trabalho acadêmico  •  2.788 Palavras (12 Páginas)  •  252 Visualizações

Página 1 de 12

Sumário

1        Telas do programa        

2        Codigo fonte desejo        

3        Desejos interface        

4        Java        

  1. Telas do programa

[pic 1][pic 2][pic 3][pic 4]

         

  1. Codigo fonte desejo

package com.example.atps;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.Menu;

import android.view.MenuItem;

import android.view.View;

import android.widget.Button;

public class Desejos extends Activity {

        

        Button alt = (Button) findViewById(R.id.alt);

        Button det = (Button) findViewById(R.id.det);

        Button ins = (Button) findViewById(R.id.ins);

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_desejos);

                

alt.setOnClickListener(new View.OnClickListener()) {

                        

@Override

public void onClick(View v) {

// TODO Auto-generated method stub

                                

Intent intent = new Intent(Desejos.this,Alterardesejo.class);

startActivity(intent);        

                        }

                };

                

det.setOnClickListener(new View.OnClickListener()) {

                        

@Override

public void onClick(View v) {

// TODO Auto-generated method stub

                                

Intent intent = new Intent(Desejos.this,Detalhesdodesejos.class);

startActivity(intent);        

                        }

                };

                

ins.setOnClickListener(new View.OnClickListener()) {

                        

@Override

public void onClick(View v) {

// TODO Auto-generated method stub

                                

Intent intent = new Intent(Desejos.this,InserirDesejo.class);

                                        startActivity(intent);        

                        }

                };

                

        }

@Override

public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.

getMenuInflater().inflate(R.menu.desejos, menu);

return true;

        }

@Override

public boolean onOptionsItemSelected(MenuItem item) {

// Handle action bar item clicks here. The action bar will

// automatically handle clicks on the Home/Up button, so long

// as you specify a parent activity in AndroidManifest.xml.

int id = item.getItemId();

if (id == R.id.action_settings) {

return true;

                }

return super.onOptionsItemSelected(item);

        }

}

  1. Desejos interface

    xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:paddingBottom="@dimen/activity_vertical_margin"

    android:paddingLeft="@dimen/activity_horizontal_margin"

    android:paddingRight="@dimen/activity_horizontal_margin"

    android:paddingTop="@dimen/activity_vertical_margin"

    tools:context="com.example.atps.DesejosActivity" >

   

        android:id="@+id/produto"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_alignLeft="@+id/spinner5"

        android:layout_below="@+id/spinner5" />

   

        android:id="@+id/spinner1"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_alignLeft="@+id/produto"

        android:layout_alignTop="@+id/produto"

        android:layout_marginTop="14dp" />

   

        android:id="@+id/spinner2"

        android:layout_width="wrap_content"

          android:layout_height="wrap_content"

        android:layout_alignLeft="@+id/spinner1"

        android:layout_below="@+id/spinner1" />

   

        android:id="@+id/spinner3"

        android:layout_width="wrap_content"

...

Baixar como (para membros premium)  txt (14.6 Kb)   pdf (215.4 Kb)   docx (60.7 Kb)  
Continuar por mais 11 páginas »
Disponível apenas no TrabalhosGratuitos.com