use of android.support.annotation.Nullable in project SimpleNews by liuling07.
the class NewsListFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_newslist, null);
mSwipeRefreshWidget = (SwipeRefreshLayout) view.findViewById(R.id.swipe_refresh_widget);
mSwipeRefreshWidget.setColorSchemeResources(R.color.primary, R.color.primary_dark, R.color.primary_light, R.color.accent);
mSwipeRefreshWidget.setOnRefreshListener(this);
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycle_view);
mRecyclerView.setHasFixedSize(true);
mLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLayoutManager);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mAdapter = new NewsAdapter(getActivity().getApplicationContext());
mAdapter.setOnItemClickListener(mOnItemClickListener);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.addOnScrollListener(mOnScrollListener);
onRefresh();
return view;
}
use of android.support.annotation.Nullable in project realm-java by realm.
the class PassingObjectsFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_passing_objects, container, false);
textContent = (TextView) view.findViewById(R.id.text_content);
setListeners(view);
return view;
}
use of android.support.annotation.Nullable in project AndroidPicker by gzu-liyujiang.
the class FilePicker method makeFooterView.
@Nullable
@Override
protected View makeFooterView() {
LinearLayout rootLayout = new LinearLayout(activity);
rootLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
rootLayout.setOrientation(LinearLayout.VERTICAL);
rootLayout.setBackgroundColor(Color.WHITE);
View lineView = new View(activity);
lineView.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 1));
lineView.setBackgroundColor(0xFFDDDDDD);
rootLayout.addView(lineView);
HorizontalListView pathView = new HorizontalListView(activity);
int height = ConvertUtils.toPx(activity, 30);
pathView.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, height));
pathView.setAdapter(pathAdapter);
pathView.setBackgroundColor(Color.WHITE);
pathView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
refreshCurrentDirPath(pathAdapter.getItem(position));
}
});
rootLayout.addView(pathView);
return rootLayout;
}
use of android.support.annotation.Nullable in project facebook-android-sdk by facebook.
the class ShareOpenGraphValueContainer method getObjectArrayList.
/**
* Gets an array of object values out of the object.
* @param key The key for the value.
* @return The object values.
*/
@Nullable
public ArrayList<ShareOpenGraphObject> getObjectArrayList(final String key) {
final ArrayList<Parcelable> items = this.bundle.getParcelableArrayList(key);
if (items == null) {
return null;
}
final ArrayList<ShareOpenGraphObject> list = new ArrayList<ShareOpenGraphObject>();
for (Parcelable item : items) {
if (item instanceof ShareOpenGraphObject) {
list.add((ShareOpenGraphObject) item);
}
}
return list;
}
use of android.support.annotation.Nullable in project AndroidDevMetrics by frogermcs.
the class Dagger2MetricsFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.adm_fragment_dagger2_metrics, container, false);
lvMetrics = (ExpandableListView) view.findViewById(R.id.lvMetrics);
tvEmpty = (TextView) view.findViewById(R.id.tvEmpty);
return view;
}
Aggregations