Favourite content is not shown correctly on webview

前端 未结 2 1175
一生所求
一生所求 2021-01-30 19:05

I\'m developing a language dictionary app. I save the favourite word into Preference. The Favourite content in the XML file looks like the following:



        
相关标签:
2条回答
  • 2021-01-30 19:53

    I think the problem comes from this line

                mWordFavourite = new ArrayList<String>(Arrays.asList(strFavourite.split(",")));
    

    where you create a new ArrayList <string> object every time but you should append to it? & get the last one otherwise you should put it in one variable

    If you are checking if its size() >0

    But each time you create a new object not appending to it

    Maybe I am wrong!

    0 讨论(0)
  • 2021-01-30 20:10

    http://developer.android.com/reference/android/webkit/WebView.html

    please refer above link for more infomations

    0 讨论(0)
提交回复
热议问题