Added empty view to feedlist Fragment
This commit is contained in:
parent
ed3890b469
commit
06b0d761fd
|
@ -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_running">Download running</string>
|
||||
|
||||
<!-- other messages -->
|
||||
<string name="nofeeds_msg">No feeds added yet.</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -9,6 +9,8 @@ import de.podfetcher.service.DownloadService;
|
|||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.LayoutInflater;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.BroadcastReceiver;
|
||||
|
@ -45,13 +47,20 @@ public class FeedlistFragment extends SherlockListFragment {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.d(TAG, "Creating");
|
||||
setHasOptionsMenu(true);
|
||||
Log.d(TAG, "Creating");
|
||||
manager = FeedManager.getInstance();
|
||||
fla = new FeedlistAdapter(pActivity, 0, manager.getFeeds());
|
||||
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
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
|
|
Loading…
Reference in New Issue