Skip to content

Commit 8c301fe

Browse files
committed
Add FindViewByIDReturnsNull operator to webpage
1 parent c2c7ce4 commit 8c301fe

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/index.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ <h5>Code Example:</h5>
591591
GUI
592592
</div>
593593
<div class="card-body">
594-
<!-- <div class="card operator">
594+
<div class="card operator">
595595
<div class="card-header" style="background-color: white;">
596596
Find View By ID Returns Null
597597
<span class="badge badge-pill badge-secondary" style="float: right;">MDroid+</span>
@@ -602,11 +602,15 @@ <h5>Description:</h5>
602602
<p>Assign a variable (returned by Activity.findViewById) to null</p>
603603
<h5>Code Example:</h5>
604604
<p>Before:</p>
605-
<textarea class="smali" name="andBefore" id="andBefore" rows="1"></textarea>
605+
<textarea class="smali" name="andBefore" id="andBefore" rows="1">invoke-virtual {p0, p1}, Lio/github/hidroh/materialistic/AboutActivity;->findViewById(I)Landroid/view/View;
606+
607+
move-result-object v0
608+
609+
check-cast v0, Landroid/widget/TextView;</textarea>
606610
<p>After:</p>
607-
<textarea class="smali" name="andBefore" id="andBefore" rows="1"></textarea>
611+
<textarea class="smali" name="andBefore" id="andBefore" rows="1">const/4 v0, 0x0</textarea>
608612
</div>
609-
</div> -->
613+
</div>
610614
<div class="card operator">
611615
<div class="card-header" style="background-color: white;">
612616
Invalid Color

0 commit comments

Comments
 (0)