Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – want to call other activity in different class file

Posted on November 11, 2022 By

Solution 1 :

you can do like this

   holder.getContext().startActivity(new Intent(holder.context(),Activity.class))

Problem :

public class allmain extends AppCompatActivity {

    RecyclerView allfurniture;

    TextView aaa;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.all);
        //allfurniture = (RecyclerView)findViewById(R.id.allfurniture);
        aaa = (TextView) findViewById(R.id.aaa);
        aaa.setText("asdafdfdafaf");
    }
}

here the all named layout file is for fragment class but i want to do coding of recyclerview and adapter class so what to do in it?

Comments

Comment posted by a_local_nobody

but i want to do coding of recyclerview and adapter class

Comment posted by ashok

You mean start the recyclerView?

Comment posted by Anand

yes in fragment we need to code differently then simple java file so i want to class fregment activity in the java file

READ  [FIXED] cordova - unable to generating an Android App Bundle from your Ionic app (without Android Studio)
Powered by Inline Related Posts
Android Tags:android, android-recyclerview, fragment

Post navigation

Previous Post: [FIXED] activity_main.xml for android studio stuck on loading
Next Post: Can a beginner learn Moonlight Sonata 1st Movement?

Related Posts

[FIXED] android – Could not resolve com.google.firebase:firebase-analytics:16.5.0 Android
[FIXED] android – How to call a composable function in onClick event Android
[FIXED] When to check the clipboard content in Android API 29 when app gets focus? Android
[FIXED] android – adb is stuck when trying to access logs or opening monitor Android
[FIXED] android – Perform network task in context of Dispatcher.Main Android
[FIXED] Android R8 fragments implements but actually matches extends Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is a good substitute for condensed milk?
  • ¿Como el cuerpo te avisa cuando te va a dar un infarto?
  • What is the luxury brand of Jaguar?
  • Who is Big poppa baseball player?
  • What material are foam runners?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme