Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- star = (ImageView) rootView.findViewById(R.id.heart);
- star.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Toast.makeText(getActivity(),"the star was clicked",
- Toast.LENGTH_LONG).show();
- }
- });
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <ImageView
- android:id="@+id/lesson_video"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:contentDescription="Video"
- android:scaleType="centerCrop"
- />
- </LinearLayout>
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View v = inflater.inflate(R.layout.lesson_video_fragment, container, false);
- videoImage = (ImageView)v.findViewById(R.id.lesson_video);
- videoImage.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- //do your thing
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement