Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8965149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:45:05+00:00 2026-06-15T16:45:05+00:00

i create Rss with json, when i get jsonObject from Background, in postExecute i

  • 0

i create Rss with json, when i get jsonObject from Background, in postExecute i create Map with objects result, then i have an error
LogCat causes an error WebView in SimpleAdapter why, no one can help?

LogCat

    12-05 17:55:35.597: E/AndroidRuntime(22543): FATAL EXCEPTION: main
    12-05 17:55:35.597: E/AndroidRuntime(22543): java.lang.IllegalStateException: android.webkit.WebView is not a  view that can be bounds by this SimpleAdapter
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.SimpleAdapter.bindView(SimpleAdapter.java:195)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.SimpleAdapter.createViewFromResource(SimpleAdapter.java:126)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.SimpleAdapter.getView(SimpleAdapter.java:114)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.AbsListView.obtainView(AbsListView.java:2161)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.ListView.makeAndAddView(ListView.java:1831)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.ListView.fillDown(ListView.java:674)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.ListView.fillFromTop(ListView.java:735)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.ListView.layoutChildren(ListView.java:1652)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.AbsListView.onLayout(AbsListView.java:1996)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.View.layout(View.java:14003)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewGroup.layout(ViewGroup.java:4375)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1663)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1521)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.View.layout(View.java:14003)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewGroup.layout(ViewGroup.java:4375)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.View.layout(View.java:14003)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewGroup.layout(ViewGroup.java:4375)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1663)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1521)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.View.layout(View.java:14003)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewGroup.layout(ViewGroup.java:4375)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.View.layout(View.java:14003)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewGroup.layout(ViewGroup.java:4375)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1892)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1711)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.Choreographer.doCallbacks(Choreographer.java:562)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.Choreographer.doFrame(Choreographer.java:532)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.os.Handler.handleCallback(Handler.java:725)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.os.Handler.dispatchMessage(Handler.java:92)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.os.Looper.loop(Looper.java:137)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at android.app.ActivityThread.main(ActivityThread.java:5238)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at java.lang.reflect.Method.invokeNative(Native Method)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at java.lang.reflect.Method.invoke(Method.java:511)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
    12-05 17:55:35.597: E/AndroidRuntime(22543):    at dalvik.system.NativeStart.main(Native Method)

SourceCode

protected void onPostExecute(JSONObject result) {
      super.onPostExecute(result);
      if(result != null){ 

      JSONObject jsn = result;
      try {
        JSONArray jarray = jsn.getJSONArray("item");
        for (int i = 0; i < jarray.length(); i++){
            JSONObject jsno = jarray.getJSONObject(i);
            Log.d("Log", jsno.getString("title"));
             rssMap = new HashMap<String, Object>();
             rssMap.put(TITLE, jsno.getString("title"));
             rssMap.put(CATEGORY, jsno.getString("category"));
             rssMap.put(DATE, jsno.getString("pubDate"));
             rssMap.put(DESCRIPTION, jsno.getString("description"));// This for webView, it's  html code!
             rssView.add(rssMap);
        }
        SimpleAdapter adapter = new SimpleAdapter(
                getApplicationContext(), rssView, R.layout.item, 
                new String[] {TITLE, CATEGORY, DATE, DESCRIPTION}, 
                new int[] {R.id.title, R.id.cat, R.id.date, R.id.desc}
                );
        list.setAdapter(adapter);
      }
      catch (JSONException e) {     
            e.printStackTrace();}
      }
      else{
          /*
           * Тут мне нужен AlertDialog с оповещанием что нету подключения к сети!
           * */
          showDialog(errorShow);      
      }

    }

}

item.xml

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Заголовок"
        android:textColor="#33b5e5"
        android:textSize="23sp" />

    <TextView
        android:id="@+id/date"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="05.12.2012"
        android:textColor="#969696"
        android:textSize="14sp" />

    <TextView
        android:id="@+id/cat"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Категория"
        android:textColor="#969696"
        android:textSize="14sp" />

    <WebView
        android:id="@+id/desc"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</LinearLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:45:06+00:00Added an answer on June 15, 2026 at 4:45 pm

    The Android documentation for SimpleAdapter states that:

    Binding data to views occurs in two phases.
    First, if a SimpleAdapter.ViewBinder is available, setViewValue(android.view.View, Object, String) is invoked. If the returned value is true, binding has occurred. If the returned value is false, the following views are then tried in order:

    • A view that implements Checkable (e.g. CheckBox). The expected bind value is a boolean.
    • TextView. The expected bind value is a string and setViewText(TextView, String) is invoked.
    • ImageView. The expected bind value is a resource id or a string and setViewImage(ImageView, int) or setViewImage(ImageView, String) is invoked.

    If no appropriate binding can be found, an IllegalStateException is thrown.

    The Adapter cannot convert your jsno.getString("description") (which is a String) to a URL on its own. You can try and convert the String then put it as a URL object in rssMap, however, I recommend that you implement your own Custom Adapter and override getView() method to set the URL of the WebView during binding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using XmlReader.Create to retrieve data from an RSS xml file. Then I
I have seen a few examples of how to create RSS feeds using ASP.NET
I have create an rss feed, all things is going to work well, but
Is there a way to create an RSS feed that only customers who have
I create an iPhone application using RSS Feed. I using XMLParsing and get the
recently I been trying to create an android app that uses JSON Objects to
I have a website that I need to create an RSS feed for. Is
I am trying to create a rss feed from a web page. I am
I have a WCF service that uses a System.ServiceModel.Syndication.SyndicationFeed to create an RSS feed.
I have the following JSON content that I'm pulling from a service feed: [

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.