Skip to content

Snappy1

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

[FIXED] java – Updating realm object and show edit screen

Posted on November 11, 2022 By

Solution 1 :

Replace your this with your ActivityName.this for example

EditUser_.intent(LoginActivity.this).start();

More reference here. I hope you do your research next time.

Problem :

I’m trying to update an object in Realm. The error is at the last line of code from the adapter. I have seen a source code similar to what I have below but it uses dialogPlus and its last line is just dialogPlus.show() What should mine contain if I won’t be using dialogPlus and just want to display my edit screen on an activity (EditUser) with its fields prepopulated?

The error is on “this”: Cannot resolve method ‘intent(anonymous android.view.View.OnClickListener)’

holder.btnEdit.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            EditText un = view.findViewById(R.id.eUsername);

            un.setText(u.getUsername());

            EditUser_.intent(this).start();
            }
    });
READ  [FIXED] android - Problem about send latitude and longtitude from geolocation to react-native-firebase on react native
Powered by Inline Related Posts
Android Tags:android, java, realm

Post navigation

Previous Post: Do you have to pay for MyNetDiary?
Next Post: [FIXED] Simple Cucumber Test is not running on Sample Android Project

Related Posts

[FIXED] gradle – ‘Android property not found.’ error while building Flutter aar Android
[FIXED] Implement custom interface in RecyclerViewAdapter with Kotlin in Android Android
[FIXED] android – is there a guide or link for learning how to create this xml view? Android
[FIXED] Android Studio Error | Emulator: emulator: ERROR: VkCommonOperations.cpp:496: Failed to create Vulkan instance Android
[FIXED] android – How to put an error under MaterialSpinner Android
[FIXED] java – DocumentReference.update() not working when app is being killed 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

  • Can VPN be traced by police?
  • Where were Kaiser-Frazer cars built?
  • How do you make gold rose gold paint?
  • What are the newest type of dentures?
  • Can you wear joggers as dress pants?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme