Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
QR-code-reader
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
QR-code-reader
Commits
66aa5298
Commit
66aa5298
authored
Oct 05, 2016
by
djamel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction des chaines de charactere
parent
ec432feb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
21 deletions
+20
-21
Development/app/src/main/java/djamelfel/gala/Login.java
Development/app/src/main/java/djamelfel/gala/Login.java
+6
-6
Development/app/src/main/res/layout/activity_login.xml
Development/app/src/main/res/layout/activity_login.xml
+1
-1
Development/app/src/main/res/values/strings.xml
Development/app/src/main/res/values/strings.xml
+13
-14
No files found.
Development/app/src/main/java/djamelfel/gala/Login.java
View file @
66aa5298
...
...
@@ -47,7 +47,7 @@ public class Login extends ActionBarActivity implements View.OnClickListener {
public
void
onClick
(
View
vue
)
{
final
Button
button
=
(
Button
)
findViewById
(
R
.
id
.
button_ipAddress
);
button
.
setEnabled
(
false
);
button
.
setText
(
getText
(
R
.
string
.
connecti
on
));
button
.
setText
(
getText
(
R
.
string
.
connecti
ng
));
String
myIpString
=
_ipAddress
.
getText
().
toString
();
String
myPortString
=
_portNumber
.
getText
().
toString
();
...
...
@@ -57,12 +57,12 @@ public class Login extends ActionBarActivity implements View.OnClickListener {
if
(!
InetAddressUtils
.
isIPv4Address
(
myIpString
))
{
display
(
getString
(
R
.
string
.
errorIP
),
false
);
button
.
setEnabled
(
true
);
button
.
setText
(
getText
(
R
.
string
.
validate
));
button
.
setText
(
getText
(
R
.
string
.
connect
));
}
else
if
(
myPortString
.
isEmpty
())
{
display
(
getString
(
R
.
string
.
errorPORT
),
false
);
button
.
setEnabled
(
true
);
button
.
setText
(
getText
(
R
.
string
.
validate
));
button
.
setText
(
getText
(
R
.
string
.
connect
));
}
else
{
AsyncHttpClient
client
=
new
AsyncHttpClient
();
...
...
@@ -93,21 +93,21 @@ public class Login extends ActionBarActivity implements View.OnClickListener {
public
void
onFailure
(
int
statusCode
,
Header
[]
headers
,
String
responseString
,
Throwable
throwable
)
{
display
(
getString
(
R
.
string
.
serverError
),
false
);
button
.
setEnabled
(
true
);
button
.
setText
(
getText
(
R
.
string
.
validate
));
button
.
setText
(
getText
(
R
.
string
.
connect
));
}
@Override
public
void
onFailure
(
int
statusCode
,
Header
[]
headers
,
Throwable
throwable
,
JSONObject
errorResponse
)
{
display
(
getString
(
R
.
string
.
serverError
),
false
);
button
.
setEnabled
(
true
);
button
.
setText
(
getText
(
R
.
string
.
validate
));
button
.
setText
(
getText
(
R
.
string
.
connect
));
}
@Override
public
void
onFailure
(
int
statusCode
,
Header
[]
headers
,
Throwable
throwable
,
JSONArray
errorResponse
)
{
display
(
getString
(
R
.
string
.
serverError
),
false
);
button
.
setEnabled
(
true
);
button
.
setText
(
getText
(
R
.
string
.
validate
));
button
.
setText
(
getText
(
R
.
string
.
connect
));
}
});
...
...
Development/app/src/main/res/layout/activity_login.xml
View file @
66aa5298
...
...
@@ -64,7 +64,7 @@
<Button
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/
validate
"
android:text=
"@string/
connect
"
android:id=
"@+id/button_ipAddress"
android:layout_alignParentRight=
"true"
android:layout_alignParentEnd=
"false"
...
...
Development/app/src/main/res/values/strings.xml
View file @
66aa5298
...
...
@@ -4,25 +4,24 @@
<string
name=
"scan"
>
Billeterie
</string>
<string
name=
"scanner"
>
Scanner Code
</string>
<string
name=
"error_lib_empty"
>
Veuillez entrer au moins une clé valide
</string>
<string
name=
"ebillet_true"
>
Le billet est valide
</string>
<string
name=
"ebillet_false"
>
Le billet n\'est pas valide
</string>
<string
name=
"id"
>
id
</string>
<string
name=
"key"
>
key
</string>
<string
name=
"barCode"
>
code bar
</string>
<string
name=
"check"
>
Vérifier
</string>
<string
name=
"sizeOff"
>
Nombre de place maximum atteint :
</string>
<string
name=
"ebillet_true"
>
Billet valide, nombre de place restante:
</string>
<string
name=
"ebillet_false"
>
Billet non valide
</string>
<string
name=
"ebillet_sizeOff"
>
Plus de place valide
</string>
<string
name=
"ebillet_available"
></string>
<string
name=
"barCode"
>
Code bar
</string>
<string
name=
"check"
>
Vérifier billet
</string>
<string
name=
"label_ipAddress"
>
Adresse IP
</string>
<string
name=
"label_port"
>
Numéro de Port
</string>
<string
name=
"
validate"
>
Valid
er
</string>
<string
name=
"connecti
on
"
>
Connection en cours ...
</string>
<string
name=
"
connect"
>
Se connect
er
</string>
<string
name=
"connecti
ng
"
>
Connection en cours ...
</string>
<string
name=
"nbPlace"
>
Nombre de place
</string>
<string
name=
"nbPlaceOversize"
>
Le nombre de place selectionné excéde le nombre de place
disponible
</string>
<string
name=
"noQRCodeApplication"
>
Auncun lecteur de QRCode n\'a été trouvé
</string>
disponible
pour ce billet
</string>
<string
name=
"noQRCodeApplication"
>
Scanner de QRCode non disponnible sur le Smartphone
</string>
<string
name=
"downloadQRCode"
>
Télécharger un scanner ?
</string>
<string
name=
"serverError"
>
Erreur: Communication serveur
</string>
<string
name=
"errorIP"
>
Wrong IP Address: Please try with an IP Address in the following
form:
\'192.168.0.1\'
</string>
<string
name=
"errorPORT"
>
Wrong port number
</string>
<string
name=
"errorIP"
>
Erreur d\'Adressage IP: Essayez avec une adresse tel que
\'192.168.0.1\'
</string>
<string
name=
"errorPORT"
>
Erreur: Vérifiez le numéro de port
</string>
<string
name=
"ex_3"
>
ex: 3
</string>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment