Skip to content

Commit 09d992d

Browse files
authored
Merge pull request #519 from bekabot/master
Remove unneeded type casts & fix comment typo in DecoratedBarcodeView.java
2 parents 95cd4a3 + 8d8cd7d commit 09d992d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

zxing-android-embedded/src/com/journeyapps/barcodescanner/DecoratedBarcodeView.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private void initialize(AttributeSet attrs) {
9090

9191
inflate(getContext(), scannerLayout, this);
9292

93-
barcodeView = (BarcodeView) findViewById(R.id.zxing_barcode_surface);
93+
barcodeView = findViewById(R.id.zxing_barcode_surface);
9494

9595
if (barcodeView == null) {
9696
throw new IllegalArgumentException(
@@ -102,7 +102,7 @@ private void initialize(AttributeSet attrs) {
102102
barcodeView.initializeAttributes(attrs);
103103

104104

105-
viewFinder = (ViewfinderView) findViewById(R.id.zxing_viewfinder_view);
105+
viewFinder = findViewById(R.id.zxing_viewfinder_view);
106106

107107
if (viewFinder == null) {
108108
throw new IllegalArgumentException(
@@ -113,11 +113,11 @@ private void initialize(AttributeSet attrs) {
113113
viewFinder.setCameraPreview(barcodeView);
114114

115115
// statusView is optional
116-
statusView = (TextView) findViewById(R.id.zxing_status_view);
116+
statusView = findViewById(R.id.zxing_status_view);
117117
}
118118

119119
/**
120-
* Initialize with no custom attributes setted.
120+
* Initialize with no custom attributes set.
121121
*/
122122
private void initialize() {
123123
initialize(null);
@@ -210,7 +210,7 @@ public void resume() {
210210
}
211211

212212
public BarcodeView getBarcodeView() {
213-
return (BarcodeView) findViewById(R.id.zxing_barcode_surface);
213+
return findViewById(R.id.zxing_barcode_surface);
214214
}
215215

216216
public ViewfinderView getViewFinder() {

0 commit comments

Comments
 (0)