Please help me. Am using Eclipse ADT for development. I am facing a problem and i am not able to fix. I tried lots of answers in this stackoverflow but no one give a right solution. Let me explain my problem
- I imported recyclerview project from this path
E:\software\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\recyclerview
After imported, right click on recyclerview project--> properties --> android tab (From left pane) ---> make checked isLibrary checkbox
Then causally, i write a code in my class which extends the fragment
public class FragmentTab1 extends Fragment {
View view;
RecyclerView mRecyclerView;
TimelineAdapter timelineAdapter;
// ListView listView;
// RecyclerView mRecyclerView;
// RecyclerView.LayoutManager mLayoutManager;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Get the view from fragmenttab1.xml
try {
view = inflater.inflate(R.layout.fragmenttab1, container, false);
mRecyclerView = (RecyclerView) view
.findViewById(R.id.my_recycler_view);
mRecyclerView.setHasFixedSize(false);
mRecyclerView.setAdapter(new TimelineAdapter(getActivity()));
} catch (Exception e) {
// TODO: handle exception
Log.e("FragOne error ", "" + e.getMessage());
Log.e("FragOne error ", "" + e.getCause());
}
return view;
}
}
I have written adapter class and am 100% sure there is no errors.
When i am seeing the layout xml file then i am unble to see the recyclerview. Please refer the image attchment below
Please take a look about my xml file what i have written
<FrameLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/light_grey"
tools:context=".LoginFollowUsers" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/letterimg"
android:scrollbars="vertical" />
</LinearLayout>
After i am importing recyclerview project from support/v7/recyclerview i am not able to see any file in src folder.. can any one share the recyclerview project
Please help me out form this issue
Thanks in advance to all