Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Started building a modern menu.
Browse files Browse the repository at this point in the history
Removed settings button from the right side. Long tapping on the "Hamburger" icon will open the settings menu.
Bumped version from 18 to 19
  • Loading branch information
dimitrisp2 committed Jun 6, 2018
1 parent 5d22bbf commit 0e116e7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
Binary file modified Files/main.bal
Binary file not shown.
2 changes: 1 addition & 1 deletion Objects/AndroidManifest.xml
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.dimitrisp.steenfo"
android:versionCode="18"
android:versionCode="19"
android:versionName="Amberdawn"
android:installLocation="preferExternal">

Expand Down
42 changes: 36 additions & 6 deletions steenfo.b4a
Expand Up @@ -65,7 +65,7 @@ Version=8
@EndOfDesignText@
#Region Project Attributes
#ApplicationLabel: SteemiAPP
#VersionCode: 18
#VersionCode: 19

#VersionName: Amberdawn
'SupportedOrientations possible values: unspecified, landscape or portrait.
Expand All @@ -86,7 +86,8 @@ Sub Process_Globals
Dim manager As AHPreferenceManager
Dim screen As AHPreferenceScreen
Dim ChosenPostBody, ChosenPostTitle, ChosenPostPPV, ChosenPostAuthor, ChosenPostCreated, ChosenPostURL, ChosenUpvotedBy As String
Dim appver As Int = 18
Dim appver As Int = 19
Dim Animator As Timer
End Sub

Sub Globals
Expand All @@ -104,6 +105,11 @@ Sub Globals
Dim TotalSBD, TotalSP, TotalAuthSP, TotalAuthSBD, TotalAuthSTEEM As Double = 0
Dim pnPrice As Panel
Private lblPriceLoading As Label
Private lblSidebar As Label
Private pnMenu As Panel
Private svMenu As ScrollView
Dim SideBarWidth As Int
Private pnMenuClose As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
Expand Down Expand Up @@ -278,6 +284,21 @@ Sub DynGlobalProps(Props As String)
TVS = TempTVS.SubString2(0, TempTVS.Length - TempTVSPrecision) & "." & TempTVS.SubString(TempTVS.Length - TempTVSPrecision)
End Sub

Sub lblSidebar_Click
Dim ScreenWidth As Int = GetDeviceLayoutValues.Width
SideBarWidth = ScreenWidth - (ScreenWidth * 40 / 100)
Log(SideBarWidth)
pnMenu.Visible = True
Animator.Initialize("pnAnimator", 1)
Animator.Enabled = True
End Sub

Sub lblSidebar_LongClick
StartActivity(screen.CreateIntent)
End Sub



Sub lvAuthor_ItemClick (Position As Int, Value As Object)
ProgressDialogShow("Loading post, please wait...")
Dim PostArray() As String
Expand Down Expand Up @@ -643,6 +664,19 @@ Sub ParseUserPost(PostHistory As String)
uPosts.Clear
End Sub

Sub pnAnimator_tick
If pnMenu.Width < SideBarWidth Then
pnMenu.Width = pnMenu.Width + 35
Else
Animator.Enabled = False
End If
End Sub

Sub pnMenuClose_Click
pnMenu.Visible = False
pnMenu.Width = 0
End Sub

Sub pnPrice_Click
pnPrice.Visible = False
End Sub
Expand Down Expand Up @@ -728,8 +762,4 @@ Sub TimeStampConvert(Timestamp As String, When As String) As String
End If

Return Elapsed & TimeUnit & TimeHappens
End Sub

Sub lblMenu_Click
StartActivity(screen.CreateIntent)
End Sub

0 comments on commit 0e116e7

Please sign in to comment.