BD ANDROID
Olá pessoal estou batendo cabeça para montar um banco de dados no Android Studio, estou postando uma imagem e o código da aplicação.
Segue o código
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="#ffffff"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="br.com.agrosantabarbara.telalogon.SangriaActivity"
tools:showIn="@layout/activity_sangria">
<ImageButton
android:id="@+id/btnCamera"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:onClick="capturarImagem"
android:src="@android:drawable/ic_menu_camera" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="AVALIAÇÃO ACABAMENTO DE GORDURA"
android:textAlignment="center"
android:textColor="#0000FF"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="AUSENTE"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarAusente"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirAusente"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewAusente"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="ESCASSA"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarEscassa"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirEscassa"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewEscassa"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="MEDIANA"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarMediana"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirMediana"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewMediana"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="UNIFORME"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarUniforme"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirUniforme"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewUniforme"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="EXCESSIVA"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarExcessiva"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirExcessiva"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewExcessiva"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/btnObsGordura"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Observação"
android:textSize="18dp" />
<Button
android:id="@+id/btnGordura"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="Salvar"
android:textSize="18dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
Segue o código
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="#ffffff"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="br.com.agrosantabarbara.telalogon.SangriaActivity"
tools:showIn="@layout/activity_sangria">
<ImageButton
android:id="@+id/btnCamera"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:onClick="capturarImagem"
android:src="@android:drawable/ic_menu_camera" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="AVALIAÇÃO ACABAMENTO DE GORDURA"
android:textAlignment="center"
android:textColor="#0000FF"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="AUSENTE"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarAusente"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirAusente"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewAusente"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="ESCASSA"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarEscassa"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirEscassa"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewEscassa"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="MEDIANA"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarMediana"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirMediana"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewMediana"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="UNIFORME"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarUniforme"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirUniforme"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewUniforme"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="EXCESSIVA"
android:textColor="#0000FF"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/adicionarExcessiva"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="+"
android:textAlignment="center"
android:textSize="18dp" />
<Button
android:id="@+id/diminuirExcessiva"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="-"
android:textAlignment="center"
android:textSize="18dp" />
<TextView
android:id="@+id/contadorTextViewExcessiva"
android:layout_width="100dp"
android:layout_height="39dp"
android:gravity="center"
android:inputType="number|textPersonName"
android:textAlignment="center"
android:textSize="18dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/btnObsGordura"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Observação"
android:textSize="18dp" />
<Button
android:id="@+id/btnGordura"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="Salvar"
android:textSize="18dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
Cicero Piga
Curtidas 0
Respostas
Luciano Gameiro
19/04/2016
Cadê a imagem?
GOSTEI 0
Cicero Piga
19/04/2016
Cadê a imagem?
Te peço desculpas, estou anexando a imagem mas quando carrega informa que a imagem não pode ser carregada, coloquei o link aonde encontra a imagem, esta tela da aplicação e um contador.
Desde já agradeço.
[img:descricao=Aplicação]http://cictreinamentos.com.br/tela.html[/img]
GOSTEI 0
Luciano Gameiro
19/04/2016
sem imagem ainda.
GOSTEI 0
Luciano Gameiro
19/04/2016
sem imagem ainda.
GOSTEI 0
Cicero Piga
19/04/2016
sem imagem ainda.
Não aparece o campo para clicar no link?
Lamentável, não sei o porque não consigo inserir a imagem, ela abre a opção carrega a imagem mas acaba informando que a imagem não pode ser carregada, por isso que indiquei o link das imagens.
O Endereço da imagem esta no link abaixo.
Desde já agradeço
http://cictreinamentos.com.br/tela.html
GOSTEI 0