forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StabbedFragment.java
35 lines (28 loc) · 1001 Bytes
/
StabbedFragment.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package dagger.fragment;
import android.app.ListFragment;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import dagger.adapter.StabbedAdapter;
import dagger.bot.R;
import javax.inject.Inject;
/**
* @author christopherperry
*/
public class StabbedFragment extends ListFragment {
@Inject Resources resources;
@Inject StabbedAdapter adapter;
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.stabbed_fragment, null);
}
@Override public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
String text = resources.getString(R.string.fragmentStab);
Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT).show();
getListView().setAdapter(adapter);
}
}