It is not working coz yu havent fetched the default shared preferences to compare it with a string
so what you have to do is fetch it and then compare like this:
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
String stripeType = prefs.getString("stripe_type", "stripe_type")
void drawStriped() {
final SurfaceHolder holder = getSurfaceHolder();
Canvas c = null;
try {
c = holder.lockCanvas();
if (c != null) {
if (stripeType.equalsIgnoreCase("vert"))
{
android.util.Log.d("stripedLog", "working");
}
}
} finally {
if (c != null)
holder.unlockCanvasAndPost(c);
}