Display HTML format text in WebView

I have faced this problem to show the HTML format text show in WebView
I found the solution for this and lets share it –

Create a xml with WebView

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

</LinearLayout>

Continue Reading

Advertisements

Can we use strikethrough on sticky notes

The “Sticky Notes” that come with Windows7 happens to be a very good application. With this you can keep a track of your task list by scribbling stuff on it.

Well, since the font formating capabilities of these notes was not very impressive I was just wondering if there is an alternative to strikethrough/strikeout a scribbled line from the note… and guess what! It does have a shortcut… Just like Ctrl+b is for Bold and Ctrl+i is for itallic, Ctrl+t is for Strikethrough/Strikeout.

Cannot resolve symbol HttpGet,HttpClient,HttpResponce in Android Studio

Today I was facing this issue “Cannot resolve symbol DefaultHttpClient” while parsing JSON in my application.

So Friends!! if you are also facing or will face the same issue then I’m giving you the solution for it. HttpClient was deprecated in API Level 22 and removed in API Level 23, You have to use URL Conntection. If you need SDK 23, add this to your gradle:
Continue Reading

Bug Lifecycle

What is a Defect Life Cycle or a Bug lifecycle in software testing?

Defect life cycle is a cycle which a defect goes through during its lifetime. It starts when defect is found and ends when a defect is closed, after ensuring it’s not reproduced. Defect life cycle is related to the bug found during testing.

Continue Reading