MrSnowflake wrote:[mod]This is not a tutorial, come on people, you do know what tutorials are, don't you? I have to move tons of posts every day, because they are in the Tutorials section where they should be in some coding problem section!
Why not do: user clicks button 1 then do setContentView(R.layout.layout2)?
Then why don't you look up the error? Check your log.worry wrote:MrSnowflake wrote:Why not do: user clicks button 1 then do setContentView(R.layout.layout2)?
I don't know why, but if I add new xml (with simple basic syntax) to eclipse project, even if I do not use it, the program starts with error.
You could also use a viewAnimator, which allows you to animate between Views, but this is not nescessairy.worry wrote:And another thing, as soon as android apps are intent based, may be it is proper to create new intent for this kind of staff (for each new layout and functionallity you are going to use)?
MrSnowflake wrote:Very simple: you can just add view (which you inflate first) and then you can select which one you want to see, don't know the appropriate method names, but the docs should make those clear.
first of all, try finding something in MSDN, it's 10 times harder as finding something in the android docs. The documentation is a lot more clear, though, indeed, no code examples, but there are a LOT examples in the samples dir, including a demonstration of a ViewAnimator.worry wrote:Actually, docs for android API are very stupid, they do not have any class usage examples, just description (Compare this to MSDN). So, any chance you know a link with example of how ViewAnimators works?MrSnowflake wrote:Very simple: you can just add view (which you inflate first) and then you can select which one you want to see, don't know the appropriate method names, but the docs should make those clear.
In cmd type: "adb logcat". Then you get to see the whole callstack.worry wrote:Also, where can I find error logs? Even if I run Debug, Eclipse just says 'source not found', when "force application close" occurs. It does not say what resource not found, or in which line of my code this error occurs. Just 'source not found', it is ridiculous.
Like I (and many other) have said thousands of times: When you see "The application stopped unexpectedly" CHECK YOUR LOG!worry wrote:For example, this is simplest program:
I have xxx.test package, which contain two files:
test1.java, test2.java with main.xml and main2.xml
test1 uses layout from main.xml
test2 uses layout from main2.xml
I want to run test2 from test
It just produce an error after it runs: the application test stopped unexpectedly. I have no clue..
Users browsing this forum: No registered users and 8 guests