Search code examples
androidrssfeed

Java RSS Feed Reader Android Studio


I can't find a guide for the RSS Feed reader for Java Android Studio.

Have you some advices?

Thanks


Solution

  • You should just be able to put it in a webview.

    How I do it is:

    package (INSERT STUFF HERE);
    
    import android.content.Intent;
    import android.os.Bundle;
    import android.provider.CalendarContract;
    import android.support.v4.app.FragmentActivity;
    import android.text.TextUtils;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;import android.os.Bundle;
    import android.webkit.WebChromeClient;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;
    
    
    public class (INSERT ACTIVITY) extends Activity {
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.(YOUR ACTIVITY));
            //identifies the webview
            WebView webView = (WebView) findViewById(R.id.(WEBVIEW ID));
            //loads the url
            webView.loadUrl("INSERT RSS FEED");
            //cancels all hyperlinks
            webView.setWebViewClient(new WebViewClient() {
                public boolean shouldOverrideUrlLoading(WebView view, String url) {
                    return false;
                }
            });
        }
    }