Search in sources :

Example 31 with Nullable

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;
}
Also used : NewsAdapter(com.lauren.simplenews.news.NewsAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) RecyclerView(android.support.v7.widget.RecyclerView) NewsView(com.lauren.simplenews.news.view.NewsView) View(android.view.View) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) Nullable(android.support.annotation.Nullable)

Example 32 with Nullable

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;
}
Also used : TextView(android.widget.TextView) View(android.view.View) Nullable(android.support.annotation.Nullable)

Example 33 with Nullable

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;
}
Also used : HorizontalListView(cn.qqtheme.framework.widget.HorizontalListView) AdapterView(android.widget.AdapterView) HorizontalListView(cn.qqtheme.framework.widget.HorizontalListView) TextView(android.widget.TextView) View(android.view.View) AdapterView(android.widget.AdapterView) ListView(android.widget.ListView) LinearLayout(android.widget.LinearLayout) Nullable(android.support.annotation.Nullable)

Example 34 with Nullable

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;
}
Also used : ArrayList(java.util.ArrayList) Parcelable(android.os.Parcelable) Nullable(android.support.annotation.Nullable)

Example 35 with Nullable

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;
}
Also used : TextView(android.widget.TextView) View(android.view.View) ExpandableListView(android.widget.ExpandableListView) Nullable(android.support.annotation.Nullable)

Aggregations

Nullable (android.support.annotation.Nullable)582 View (android.view.View)315 TextView (android.widget.TextView)163 RecyclerView (android.support.v7.widget.RecyclerView)85 BindView (butterknife.BindView)57 ImageView (android.widget.ImageView)52 ArrayList (java.util.ArrayList)43 IOException (java.io.IOException)36 Bundle (android.os.Bundle)35 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)35 Intent (android.content.Intent)32 ViewGroup (android.view.ViewGroup)32 Cursor (android.database.Cursor)29 Uri (android.net.Uri)27 File (java.io.File)24 AdapterView (android.widget.AdapterView)22 List (java.util.List)20 NonNull (android.support.annotation.NonNull)19 Context (android.content.Context)15 Bitmap (android.graphics.Bitmap)15