Correct show images in a switch case function?(Android)
<p>So I need to show one of the images according to my switch case function, and I don't really know what would be the best way to do it. Do I really need to put them in an xml file, can I just draw them in the function? Also, do I need to put this function in an activity?</p>

<p>I can provide you my switch case function:</p>

<pre><code>public void BloodStatistics(){
        String state;
        int cases=1;
        switch(cases){
        case 1: if(sys&lt;90 &amp;&amp; dys&lt;60)
            state="Hypotension";
        break;
        case 2: if(sys&gt;90 &amp;&amp; sys&lt;119 &amp;&amp; dys&gt;60 &amp;&amp; dys&lt;79)
            state="Desriable";
        break;
        case 3: if(sys&gt;120 &amp;&amp; sys&lt;139 &amp;&amp; dys&gt;80 &amp;&amp; dys&lt;89)
            state="Prehypertension";
        break;
        case 4: if(sys&gt;140 &amp;&amp; sys&lt;159 &amp;&amp; dys&gt;90 &amp;&amp; dys&lt;99)
            state="Hypertension Stage 1";
        break;
        case 5: if(sys&gt;160 &amp;&amp; sys&lt;179 &amp;&amp; dys&gt;100 &amp;&amp; dys&lt;109)
            state="Hypertension Stage 2";
        break;
        case 6: if(sys&gt;=180 &amp;&amp; dys&gt;=110)
            state="Hypertension Crisis";
        break;
        case 7: if(sys&lt;90 &amp;&amp; dys&gt;=60)
            state="Hypotension";
        break;
        default: state="invalid mesurements";
        break;

        }
    }
</code></pre>

<p>and these are my images:</p>

<pre><code>ImageView Hypotension, Desriable, Prehypertension, Hypertension_Stage_1, Hypertension_Stage_2, Hypertension_Crisis;
</code></pre>

<p>I'm sorry if the question seems too easy :(</p>
