mirror of
https://bitbucket.org/HeshamTB/barcodescanner2.git
synced 2024-11-05 11:02:14 +01:00
info. Final Edit.
This commit is contained in:
parent
570cba2ca6
commit
bb1db8fc9e
Binary file not shown.
@ -7,7 +7,7 @@ android {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 16
|
||||
versionCode 1
|
||||
versionName '0.2'
|
||||
versionName '0.3'
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
@ -28,6 +28,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".infoActivity">
|
||||
android:parentActivityName=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
@ -25,6 +25,7 @@ import android.content.Context;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
|
||||
|
||||
import com.google.zxing.integration.android.IntentResult;
|
||||
import com.google.zxing.integration.android.IntentIntegrator;
|
||||
|
||||
@ -33,6 +34,7 @@ import com.google.zxing.integration.android.IntentIntegrator;
|
||||
public class MainActivity extends AppCompatActivity implements OnClickListener {
|
||||
|
||||
private Button button;
|
||||
private Button infoButton;
|
||||
boolean passed1, passed2 = false;
|
||||
|
||||
|
||||
@ -54,6 +56,8 @@ public class MainActivity extends AppCompatActivity implements OnClickListener {
|
||||
});
|
||||
button = (Button)findViewById(R.id.button);//
|
||||
button.setOnClickListener(this);//
|
||||
infoButton = findViewById(R.id.infoButton);
|
||||
infoButton.setOnClickListener(this);
|
||||
|
||||
|
||||
}
|
||||
@ -87,7 +91,11 @@ public class MainActivity extends AppCompatActivity implements OnClickListener {
|
||||
//start barcode scan cam 1,2
|
||||
IntentIntegrator scanIntegrator = new IntentIntegrator(this);
|
||||
scanIntegrator.initiateScan(0);
|
||||
}
|
||||
|
||||
if (v.getId() == R.id.infoButton){
|
||||
Intent intent = new Intent(this , infoActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -6,4 +6,22 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".infoActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="377dp"
|
||||
android:layout_height="212dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="center"
|
||||
android:text="@string/info"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -22,7 +22,25 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.322" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/infoButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/infoButton"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button"
|
||||
app:layout_constraintVertical_bias="0.151" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
@ -32,12 +50,14 @@
|
||||
android:layout_marginLeft="85dp"
|
||||
android:layout_marginRight="82dp"
|
||||
android:layout_marginStart="85dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:fontFamily="serif-monospace"
|
||||
android:text="@string/TextViewLabel"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
@ -3,7 +3,9 @@
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="scan">Scan</string>
|
||||
<string name="TextViewLabel">KAU.IE201.TEAM3</string>
|
||||
<string name="version">0.2</string>
|
||||
<string name="version">0.3</string>
|
||||
<string name="infoButton">Info</string>
|
||||
<string name="info">Made by Hesham and IE200 Team 3\nInstructed by Dr. Nibras Subahi\n© 2018 KAU. All rights reserved. </string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user