Category : fragment

i’ve been working on Android App in AndroidStudio. Application has Fragment, let’s call it MainFragment, and seperate Java Class file, let’s call it SQLiteControler.class The problem is when i try to call method from Fragment in SQLiteController im getting null object reference as error Here is some minified code: MainFragment public class MainFragment extends Fragment ..

Read more

I’m having troubles of getting my current position coordinates using the GPS provider of android location system. I am a beginner in kotlin programming but I have already read a lot of tutorials and I didn’t find the answer. Codes I’m using: This is my Fragment: class MapFragment : Fragment(), OnMapReadyCallback { private var _binding: ..

Read more

I have a activity with a button and below that I have navhost fragment with 3 fragments. But when I click on button nothing happens, I thick because id of fragment is not getting. Here is my code : class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ..

Read more

I have to select images, for that I’m using a library FishBun https://github.com/sangcomz/FishBun In an Activity screen it is working fine and I’m able to get URI‘s in onActivityResult But, in Fragment onActivityResult is not being called. I have not intent to call startActivityForResult When button click – the following method will call FishBun.with(xactivity) .setImageAdapter(new ..

Read more

I have a small project but there is an error, here I explain where the error is The complete error is as follows: : E/AndroidRuntime: FATAL EXCEPTION: main Process: com.androidrion.navigationdrawer, PID: 30525 java.lang.IllegalArgumentException: No view found for id 0x7f0801d0 (com.androidrion.navigationdrawer:id/top_this_week_webview) for fragment TopThisWeekFragment{1e467af} (485eb865-b2d8-4991-84c5-68ae567ba105 id=0x7f0801d0) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:513) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002) ..

Read more