title: List Pref trouble android
body: <p>I am having trouble working with list pref. I am trying to match a list pref value to another value with if statement</p>
  
  <p>I bet that doesnt make sense so I will post code...</p>
  
  <p>stripedMain:</p>
  
  <pre><code>String stripeType = "";
  void drawStriped() {
              final SurfaceHolder holder = getSurfaceHolder();
              Canvas c = null;
              try {
                  c = holder.lockCanvas();
                  if (c != null) {
                      if (stripeType == "vert") 
                      {
                      android.util.Log.d("stripedLog", "working");    
                          }
                  }
              } finally {
                  if (c != null)
                      holder.unlockCanvasAndPost(c);
              }
  .............
  </code></pre>
  
  <p>settings.xml:</p>
  
  <pre><code>&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;PreferenceCategory
          android:key="firKey"
          android:title="Wallpaper Settings" &gt;
  
          &lt;ListPreference
              android:defaultValue="hor"
              android:entries="@array/stripe_entries"
              android:entryValues="@array/stripe_values"
              android:key="stripe_type"
              android:title="Type" /&gt;
  
      &lt;/PreferenceCategory&gt;
  
  &lt;/PreferenceScreen&gt;
  </code></pre>
  
  <p>shapes.xml:</p>
  
  <pre><code>&lt;resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"&gt;
  
      &lt;string-array name="stripe_entries"&gt;
          &lt;item&gt;"Horizontal"&lt;/item&gt;
          &lt;item&gt;"Vertical"&lt;/item&gt;
           &lt;item&gt;"Both"&lt;/item&gt;
            &lt;item&gt;"Both+CrossOver"&lt;/item&gt;
      &lt;/string-array&gt;
  
      &lt;string-array name="stripe_values"&gt;
          &lt;item&gt;"hor"&lt;/item&gt;
          &lt;item&gt;"vert"&lt;/item&gt;
           &lt;item&gt;"both"&lt;/item&gt;
          &lt;item&gt;"bothOver"&lt;/item&gt;
      &lt;/string-array&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>This is not working and I have no idea why....</p>