Post Reply

[GUIDE] Quantum Paper UI

OP TheArc

18th June 2014, 08:44 PM   |  #21  
TheArc's Avatar
OP Recognized Themer
Flag Auckland City
Thanks Meter: 1,798
 
2,288 posts
Join Date:Joined: Jan 2012
Donate to Me
More
Quote:
Originally Posted by Sahaab

oh ok so it shud work on gingerbread as well
thnx man i will surely try it out, i want to make a new UI for my app

Yeah, defiantly. It should work as the images don't need a specific api level.
And good luck mate!

Sent from my Nexus 5 using Tapatalk
The Following User Says Thank You to TheArc For This Useful Post: [ View ]
18th June 2014, 10:55 PM   |  #22  
Sahaab's Avatar
Recognized Contributor / Themer
Flag London ON
Thanks Meter: 3,289
 
3,578 posts
Join Date:Joined: May 2013
Donate to Me
More
Quote:
Originally Posted by krishneelg3

Yeah, defiantly. It should work as the images don't need a specific api level.
And good luck mate!

Sent from my Nexus 5 using Tapatalk

i use the exact same code you gave, and i just keep getting an overflow logcat for the ImageButton
i have tried making various changes, but still same thing :-/
it gets fixed inside eclipse, but still doesnt work on my phone :-/

Edit: Log
 

Code:
06-18 18:04:28.595: E/AndroidRuntime(1138): FATAL EXCEPTION: main
06-18 18:04:28.595: E/AndroidRuntime(1138): Process: com.ashutos.quantumpaperui, PID: 1138
06-18 18:04:28.595: E/AndroidRuntime(1138): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ashutos.quantumpaperui/com.ashutos.quantumpaperui.MyActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.ImageButton
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.ActivityThread.access$800(ActivityThread.java:135)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.os.Looper.loop(Looper.java:136)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.ActivityThread.main(ActivityThread.java:5017)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at java.lang.reflect.Method.invoke(Method.java:515)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at dalvik.system.NativeStart.main(Native Method)
06-18 18:04:28.595: E/AndroidRuntime(1138): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.ImageButton
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.createView(LayoutInflater.java:620)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.Activity.setContentView(Activity.java:1929)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at com.ashutos.quantumpaperui.MyActivity.onCreate(MyActivity.java:14)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.Activity.performCreate(Activity.java:5231)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	... 11 more
06-18 18:04:28.595: E/AndroidRuntime(1138): Caused by: java.lang.reflect.InvocationTargetException
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at java.lang.reflect.Constructor.constructNative(Native Method)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.view.LayoutInflater.createView(LayoutInflater.java:594)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	... 27 more
06-18 18:04:28.595: E/AndroidRuntime(1138): Caused by: java.lang.StackOverflowError
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.DrawableContainer$DrawableContainerState.<init>(DrawableContainer.java:511)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.StateListDrawable$StateListState.<init>(StateListDrawable.java:281)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.StateListDrawable.<init>(StateListDrawable.java:327)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.StateListDrawable.<init>(StateListDrawable.java:75)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:898)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.content.res.Resources.loadDrawable(Resources.java:2092)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.content.res.Resources.getDrawable(Resources.java:700)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:176)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:937)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.content.res.Resources.loadDrawable(Resources.java:2092)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.content.res.Resources.getDrawable(Resources.java:700)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:176)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:937)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.content.res.Resources.loadDrawable(Resources.java:2092)
06-18 18:04:28.595: E/AndroidRuntime(1138): 	at android.cont


Edit 2 : working just fine without button

Edit 3: Figured it out
Last edited by Sahaab; 19th June 2014 at 02:57 AM.
19th June 2014, 06:15 AM   |  #23  
CurlyY's Avatar
Member
Thanks Meter: 109
 
92 posts
Join Date:Joined: Mar 2011
WOW looks great, good work !
20th June 2014, 04:52 PM   |  #24  
and.roid's Avatar
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Jul 2012
Guys how can i add menu to the imagebutton thing ?
so when i click it a option bar show so i can add some other activities.

and thanks alot for the guid thread.
20th June 2014, 10:44 PM   |  #25  
TheArc's Avatar
OP Recognized Themer
Flag Auckland City
Thanks Meter: 1,798
 
2,288 posts
Join Date:Joined: Jan 2012
Donate to Me
More
Quote:
Originally Posted by and.roid

Guys how can i add menu to the imagebutton thing ?
so when i click it a option bar show so i can add some other activities.

and thanks alot for the guid thread.

This may be what you're looking for - http://stackoverflow.com/questions/3...-from-a-button

Sent from my Nexus 5 using Tapatalk
The Following 2 Users Say Thank You to TheArc For This Useful Post: [ View ]
24th June 2014, 10:16 AM   |  #26  
TheArc's Avatar
OP Recognized Themer
Flag Auckland City
Thanks Meter: 1,798
 
2,288 posts
Join Date:Joined: Jan 2012
Donate to Me
More
I've updated the first thread with new content and fixes.
I've also added a sample source code for Eclipse and an installable apk.
This can be found above the "What you'll Need" section.
The Following 2 Users Say Thank You to TheArc For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Java for Android App Development by ThreadRank