Paolodc
Member
From this tutorial:
https://www.b4x.com/android/forum/threads/amir_fragment.101189/
I've downloaded the basic project and I haven't changed anything. It made an error from Compiler.
The lines from where the error is made are these:
The error is this:
Can I get help? Actually, I don't know how to find the solution for it.
@alimanam3386, please!
https://www.b4x.com/android/forum/threads/amir_fragment.101189/
I've downloaded the basic project and I haven't changed anything. It made an error from Compiler.
The lines from where the error is made are these:
B4X:
Public Sub LoadFragment (FragmentIndex As Int,throwIfSelectedBefore As Boolean)
If throwIfSelectedBefore Then
If FragmentIndex=SelectedFragment Then Return
End If
Dim Fragment As Amir_Fragment
Dim FT As Amir_FragmentTransaction
FT.Initialize
Select FragmentIndex
Case 1
Dim First As FirstFragment
First.Initialize
Fragment=First.Fragment
Case 2
Dim Second As SecondFragment
Second.Initialize
Fragment=Second.Fragment
End Select
If throwIfSelectedBefore Then
SetAnimation(FT,FragmentIndex,SelectedFragment)
Else
FT.Transition=FT.TRANSIT_NONE
End If
FT.Replace3(Content,Fragment)' <--------- It makes an error
FT.Commit
SelectedFragment=FragmentIndex
End Sub
The error is this:
B4X:
Compiling generated Java code. Error
B4A line: 104
FT.Replace3(Content,Fragment)' <--------- It make
src\com\aghajari\fragments\basic\main.java:496: error: cannot access Fragment
_ft.Replace3((android.view.View)(mostCurrent._content.getObject()),(com.aghajari.fragments.Fragment)(_fragment.getObject()));
^
class file for android.support.v4.app.Fragment not found
Can I get help? Actually, I don't know how to find the solution for it.
@alimanam3386, please!