I want to open webpages within android app?

I have created an application and data of user is loaded via firebase recycler adapter. It have data of users and each user have a link in their profile which redirect to a webpage. Everything is working fine the user is redirected to the webpage via the default browser. My question is how can I restrict the app to open the links/urls within itself. I don't want the links to be opened in the default browser. Below is my code


class MyViewHolder extends RecyclerView.ViewHolder {

    TextView geglink, userName, userAbout;
    View v;

    public MyViewHolder(@NonNull @NotNull View itemView) {

        geglink = (TextView) itemView.findViewById(R.id.rcvGigLink);
        userName = (TextView) itemView.findViewById(R.id.rcvName);
        userAbout = (TextView) itemView.findViewById(R.id.rcvAbout);
        v = itemView;


  RecyclerView recyclerView;
    FirebaseRecyclerOptions<ModelClass> options;
    FirebaseRecyclerAdapter<ModelClass, MyViewHolder> adapter;
    DatabaseReference dRef;

    protected void onCreate(Bundle savedInstanceState) {

        dRef = FirebaseDatabase.getInstance().getReference().child("Users");

        recyclerView = findViewById(R.id.dashboardRCV);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));



    private void LoadData() {
        options = new FirebaseRecyclerOptions.Builder<ModelClass>()
                .setQuery(dRef, ModelClass.class)
        adapter = new FirebaseRecyclerAdapter<ModelClass, MyViewHolder>(options) {
            protected void onBindViewHolder(@NonNull MyViewHolder holder, int position, @NonNull ModelClass model) {

                holder.v.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        String url = model.getGig();
                if (!url.startsWith("http://") && !url.startsWith("https://")){
                    url = "https://" + url;
                    Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

            public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
                View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.recyclerview_layout, parent, false);
                return new MyViewHolder(view);


public class ModelClass {

    String gig, name, about;

    public String getGig() {
        return gig;

    public void setGig(String gig) {
        this.gig = gig;

    public String getName() {
        return name;

    public void setName(String name) {
        this.name = name;

    public String getAbout() {
        return about;

    public void setAbout(String about) {
        this.about = about;

    public ModelClass(String gig, String name, String about) {
        this.gig = gig;
        this.name = name;
        this.about = about;

    public ModelClass() {

Thanks in advance

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum