jfeinstein10 SlidingMenu library

Status
Not open for further replies.

DonManfred

Expert
Licensed User
Longtime User
the folder with the resources is available?

B4X:
#AdditionalRes: C:\Users\enrico\Documents\slidingMenu\res, com.jeremyfeinstein.slidingmenu.lib
 

DonManfred

Expert
Licensed User
Longtime User
The code is standard code i upload here, could you please
I´ve edited the code, added the res folder to the project and changed the path to it.

After that i got an exception that android support v4 could not resolved. I added an additionaljar.

B4X:
#AdditionalRes: ..\res, com.jeremyfeinstein.slidingmenu.lib
#AdditionalJar: com.android.support:support-v4

See this example (tried with B4A 6.5 and Android 6)
 

Attachments

  • slidingnew.zip
    8.9 KB · Views: 583

holdemadvantage

Active Member
Licensed User
Longtime User
I´ve edited the code, added the res folder to the project and changed the path to it.

After that i got an exception that android support v4 could not resolved. I added an additionaljar.

B4X:
#AdditionalRes: ..\res, com.jeremyfeinstein.slidingmenu.lib
#AdditionalJar: com.android.support:support-v4

See this example (tried with B4A 6.5 and Android 6)

Thanks friend,

with your code same issue , i started to think at sdk installation, this is a new pc

I installed the components attached

Do i have to install something else?
Thanks in advance
 

Attachments

  • android.jpg
    android.jpg
    79.4 KB · Views: 378

DonManfred

Expert
Licensed User
Longtime User
Do i have to install something else?
Follow the Installation instructions here https://www.b4x.com/b4a.html
Especially the Step 2

2. Android SDK
  • Download Android SDK.
  • Install the SDK. The SDK doesn't work properly when it is installed in a path with spaces (like "Program Files").
    It is recommended to install it to a custom folder similar to C:\Android
    .
  • Install Android SDK Tools, Android SDK Platform-Tools, Android SDK Build-tools (v23.0.3 is recommended),
    Android Support Repository, Google Repository and at least one platform (see the image below). Use API 14 or above.
  • You can also install Google USB Driver if you need to connect a physical device with USB. A list of other drivers is available here.

    SS-2016-06-21_14.53.36.png
 

holdemadvantage

Active Member
Licensed User
Longtime User
Done all, no way :oops:

B4X:
B4A version: 6.50
Parsing code.    (0.00s)
Compiling code.    (0.04s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
Generating R file.    Error
c:\slidingmenu\res\values\styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.
c:\slidingmenu\res\values\styles.xml:5: error: Error: No resource found that matches the given name: attr 'homeAsUpIndicator'.
 

Ferdari

Active Member
Licensed User
Longtime User
Hello Erel, thanks for the Library,

I have some questions,

i tried to set my menu slide with the titlebar, and tried to add shadow, but throws me some error when compiling

how do i access this settings?

B4X:
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setShadowWidthRes(R.dimen.shadow_width);
menu.setShadowDrawable(R.drawable.shadow);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);

Also it is posible to slide the Menu over Activity?, not sliding the activity.

Thank you!
 

Myr0n

Active Member
Licensed User
Longtime User
Hi
Please check this thread
 

Ferdari

Active Member
Licensed User
Longtime User
Hi
Please check this thread
Thank you Myron!,

Do you know if exists any setting to set min width, because in larger screen or landscape mode Menu covers around 80% of the screen, all objects in menu seen unproportionate, distorted.

THank you in advance Myron :)

EDIT: Forget the question, i didnt see the offset and width, i set it to 300dip width, and offset Activity.Width - 300dip
 
Last edited:

Myr0n

Active Member
Licensed User
Longtime User
Thank you Myron!,

Do you know if exists any setting to set min width, because in larger screen or landscape mode Menu covers around 80% of the screen, all objects in menu seen unproportionate, distorted.

THank you in advance Myron :)

EDIT: Forget the question, i didnt see the offset and width, i set it to 300dip width, and offset Activity.Width - 300dip
Can you upload a test project showing the issue please.
 

lucad

Member
Licensed User
Longtime User
Hello,

I think the call
B4X:
 ime.AddHeightChangedEvent
cannot live with this slidingmenu library o_O
App crashes with no logs and no messages ... can someone confirm this ?
 

jchal

Active Member
Licensed User
Longtime User
hi all
i have b4a v6.80 i tryed to run the example code but example whe it start runing it stops with out to give me any error in the log , n the screen it says B4A Example stoped , here is the code, i did not toch nothis from the example code i simply dowload it and try to run it. why this happens?
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region
    #Extends: android.support.v7.app.AppCompatActivity
Sub Process_Globals

End Sub

Sub Globals
    Private ACToolBarLight1 As ACToolBarLight
    Private ToolbarHelper As ACActionBar
    Private sm As SlidingMenu
    Private ListView1 As ListView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    ToolbarHelper.Initialize
    ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png"))
    ToolbarHelper.UpIndicatorDrawable =  bd
    ACToolBarLight1.InitMenuListener
    sm.Initialize("sm")
    Dim offset As Int = 100dip
    sm.BehindOffset = offset
    sm.Mode = sm.LEFT
    Dim lftMenu As Panel
    lftMenu.Initialize("")
    sm.Menu.AddView(lftMenu, 0, 0, 100%x - offset, 100%y)
    lftMenu.LoadLayout("Left")
    For i = 1 To 30
        ListView1.AddSingleLine("Item " & i)
    Next
End Sub

Sub ACToolBarLight1_NavigationItemClick
    sm.ShowMenu
End Sub



Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 

jchal

Active Member
Licensed User
Longtime User
when i run it in debug mode the log says
LogCat connected to: 4c139dbe13c9b100
--------- beginning of /dev/log/main

the b4a says what you see on screen shot attched
and my mo ile phone says B4A Example stoped
 

Attachments

  • error.png
    error.png
    118.9 KB · Views: 354

focus330

Member
Licensed User
Longtime User
How to control the Slide height ?

Refering to the code exposed two threads above I tried this
sm.Menu.AddView(lftMenu, 0, 0, 100%x - offset, 50%y)
and this
sm.Menu.Height = 50%y
and also
lftMenu.Height = 50%y

But slide in any case uses the all vertical dimension.

Thanks
 
Status
Not open for further replies.
Top