Butter Knife - Complete with source code

Butter or margarine?

  • Butter

    Votes: 6 60.0%
  • Margarine

    Votes: 2 20.0%
  • Peanut Butter

    Votes: 2 20.0%

  • Total voters
    10

wonder

Expert
Licensed User
Longtime User
Spread butter like a pro! :cool:
B4X:
#Region  Project Attributes
    #ApplicationLabel: Butter Knife
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: Landscape
    #CanInstallToExternalStorage: True
#End Region

#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: False
#End Region

Sub Process_Globals

End Sub

Sub Globals
    Private Knife As ImageView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Load Layout
        Activity.LoadLayout("Kitchen")

    'Center the knife on screen
        Knife.Width = 100%x
        Knife.Height = Knife.Width * (154 / 745)
        Knife.Left = 50%x - (Knife.Width / 2)
        Knife.Top = 50%y - (Knife.Height / 2)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Capture.png


IMG_9926.png


Let me know if you find any bugs or issues. :D
 

Attachments

  • knife.zip
    63.5 KB · Views: 201

NJDude

Expert
Licensed User
Longtime User
Your app crashes, not compatible with Peanut Butter (and I love peanut butter), see the logs below.
B4X:
java.lang.ClassUseException: java.lang.Object[] cannot be used with Peanut_Butter
	at android.os.Bundle.getLongArray(Bundle.java:1458)
	at android.content.Intent.getLongArrayExtra(Intent.java:4648)
	at com.sec.spp.push.dlc.sender.DlcRequestReceiver.onReceive(Unknown Source)


	at android.app.ActivityThread.handleReceiver(ActivityThread.java:2280)
	at android.app.ActivityThread.access$1600(ActivityThread.java:143)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4950)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
	at dalvik.system.NativeStart.main(Native Method)

:D :D :p
 

wonder

Expert
Licensed User
Longtime User
Thanks for the bug report, @NJDude

After some tests, I found out that if you set your minSdkVersion to 9, you can use peanut butter without any problems.
I'm not sure about Nutella though.
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
 

KMatle

Expert
Licensed User
Longtime User

Cableguy

Expert
Licensed User
Longtime User
Nutela works perfectly BUT, Tulicreme shows some bizarrish behavior, as I have found myself liking the screen long after closing the app!
oh! for compatibility sake, tested with KitKat, JelyBeans, IceCream Sandwich, in a GingerBread base.
 

Cableguy

Expert
Licensed User
Longtime User
You could do it...
a few sugestions... have diferent knifes sets, like wooden ones, or even silver... different sizes too...
sell the knifes packs... advertive bread brands... and juice too, like Sumol or Caprisone... no Alchool thou...
 

wonder

Expert
Licensed User
Longtime User
It might be the butter itself. Do you have the latest update?
I've seen a few topics on StackExchange where users report that some bugs very are attracted to older versions of butter.

Either update your butter or download the latest BreadSpread™ framework for Android and recompile the app, it should solve the problem.
 

ilan

Expert
Licensed User
Longtime User
have you found the origin of this bug? are you able to reproduce it? I don't think this is related to the knife... I mean, the app... maybe an (i)OS Bug?

sorry, it was my mistake i forget to intialize the butter...
now everything is working, i love this community so much experts here that help you with any issue.. :)
 

udg

Expert
Licensed User
Longtime User
have you found the origin of this bug?are you able to reproduce it?
Yes, it took me some time because I had to find the proper female bug..but now they reproduce a lot!
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Female bug, female bug.... Damned. You didn't wrote on the manual that I couldn't use liquid butter. Poor my... ;-)
 
Top