Check internet connection in Android and reload the activity if it is not available

I have develped an Android RSS reader.I have created a tab layout and created each tab for each type of news(say Headlines,National,International etc).

Then I listed RSS title and its images in custom listview on the first page of tablayout.
see the image below.

Now when the user click on a news title, another activity(page) opens with the news description.

My problem is when a user clicks on a tab and when it loads, if the internet connection is not available I want to show a dialog box with two buttons, Retry & Exit.

When the user click Retry the activity should be reloaded.I used a method( if(International.Title==null) ).But I dont think its a right method to do this.I want to know if there is a better solution for checking whether the network is available....