How to make clickable layout in Fragment

  • Replies:1
  • Answered
Ashfaq
  • Forum posts: 17

Nov 24, 2014, 7:57:50 AM via Website

Hi friends,

Here is my java code of a swipe fragment and i have made a layout inside that fragment,

package info.androidhive.slidingmenu;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import info.androidhive.CrescentBuilders.R;

public class Ongoing extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View android = inflater.inflate(R.layout.ongoing_frag, container, false);
//((TextView)android.findViewById(R.id.textView)).setText("Ongoing Projects");
RelativeLayout ongoing=(RelativeLayout)android.findViewById(R.id.layoutongoing);
return android;

}

}

Reply
Kevin Berendsen
  • Forum posts: 118

Nov 24, 2014, 10:08:44 AM via Website

I can see the thread is marked at read, I had the answer in my mind as well however, could you perhaps reply with the answer that helped you solve your problem. For the sake of others when they encounter the same problem and land on this page :)

Reply