how get

后端 未结 2 1889
Happy的楠姐
Happy的楠姐 2020-12-22 08:24

how get the url a rss feed and open on in android




        
2条回答
  •  无人及你
    2020-12-22 08:59

    first you should get description string with RssParser and then send that string to this method. YOU DON'T NEED TO LIBRARY. of course first you should replace " with ' for match your example with my answer and also choose an special word that just exist in your img url for "equals" in my code. like "pix" word that exist in your question.

    private String helperString(String str) {
        String[] strings = str.split("'");
        for (String string: strings) {
            Log.i("STR", "string : " + string);
            String[] newString = string.split("/");
            for (String a: newString) {
                if (a.equals("images")){  //in your question pix or other words
                    Log.i("URL", "Image Url is : " + string);
                    return string;
                }
            }
        }
        return "";
    }
    

提交回复
热议问题