title: How to set Weather icons for Night and Day both on Android
body: <p>I am making a weather app. Whole app is done and everything is working fine except NIGHT ICONS. I have set icons for the day. But I don't how to set two different icons on one condition that checks the time, if its day it shows SUN &amp; if its night it should show MOON</p>
  
  <p>Here is my code:</p>
  
  <pre><code>private static String updateWeatherIcon(int condition) {
  
      if (condition &gt;= 0 &amp;&amp; condition &lt; 300) {
          return "tstorm1";
      } else if (condition &gt;= 300 &amp;&amp; condition &lt; 500) {
          return "light_rain";
      } else if (condition &gt;= 500 &amp;&amp; condition &lt; 600) {
          return "shower3";
      } else if (condition &gt;= 600 &amp;&amp; condition &lt;= 700) {
          return "snow4";
      } else if (condition &gt;= 701 &amp;&amp; condition &lt;= 771) {
          return "fog";
      } else if (condition &gt;= 772 &amp;&amp; condition &lt; 800) {
          return "tstorm3";
      } else if (condition == 800) {
          return "sunny";
      } else if (condition &gt;= 801 &amp;&amp; condition &lt;= 804) {
          return "cloudy2";
      } else if (condition &gt;= 900 &amp;&amp; condition &lt;= 902) {
          return "tstorm3";
      } else if (condition == 903) {
          return "snow5";
      } else if (condition == 904) {
          return "sunny";
      } else if (condition &gt;= 905 &amp;&amp; condition &lt;= 1000) {
          return "tstorm3";
      }
  
      return "dunno";
  }
  </code></pre>
  
  <p>please help me out. </p>