Added empty view to feedlist Fragment
This commit is contained in:
parent
ed3890b469
commit
06b0d761fd
15
res/layout/feedlist.xml
Normal file
15
res/layout/feedlist.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:orientation="vertical" >
|
||||||
|
|
||||||
|
<ListView android:id="@id/android:list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<TextView android:id="@id/android:empty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android_text="@string/nofeeds_msg"/>
|
||||||
|
</LinearLayout>
|
@ -26,5 +26,8 @@
|
|||||||
<string name="download_pending">Download pending</string>
|
<string name="download_pending">Download pending</string>
|
||||||
<string name="download_running">Download running</string>
|
<string name="download_running">Download running</string>
|
||||||
|
|
||||||
|
<!-- other messages -->
|
||||||
|
<string name="nofeeds_msg">No feeds added yet.</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -9,6 +9,8 @@ import de.podfetcher.service.DownloadService;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
@ -45,13 +47,20 @@ public class FeedlistFragment extends SherlockListFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Log.d(TAG, "Creating");
|
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
Log.d(TAG, "Creating");
|
||||||
manager = FeedManager.getInstance();
|
manager = FeedManager.getInstance();
|
||||||
fla = new FeedlistAdapter(pActivity, 0, manager.getFeeds());
|
fla = new FeedlistAdapter(pActivity, 0, manager.getFeeds());
|
||||||
setListAdapter(fla);
|
setListAdapter(fla);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
super.onCreateView(inflater, container, savedInstanceState);
|
||||||
|
return inflater.inflate(R.layout.feedlist, container, false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user