collapsingtoolbar get error with afollestad-material-dialogs - dialog

I want to use this dialogs in my apps because these can change direction of multiple choice list. I have CollapsingToolbarLayout in my app too, but when I add this lib to my gradle file this error happens. what can I do?
FATAL EXCEPTION: main Process: ir.yasin.dordaneh.shahre_namha, PID: 6940 android.view.InflateException:
Binary XML file line #138: Error inflating class android.support.design.widget.CollapsingToolbarLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at ...

finaly I got my answer. I just use another collapsingtoolbar library from android arsenal like this .

Related

Create C# class from reqif.xsd

I am trying to generate a C# class from the following ReqIF XSD file.
I have tried with xsd.exe which failed and now also with xsd2code which fails with the following error message (translation: reference to undeclared attribute group):
Xsd2Code Version 3.4.0.32990
Code generation utility from XML schema files.
Error: Verweis auf nicht deklarierte Attributgruppe http://www.w3.org/1999/xhtml:xhtml.style.attrib.
SubType: Unspecified
Rule:
I suppose the xsd file is not 100% correct. I tried to get some information about the xsd format, but with my limited knowledge I was not able to solve the issue.
Does somebody have an idea what could be wrong here or how I could proceed?
Thanks!
I was able to generate java code with the linked files and the following command line on Windows (make sure the files are all in the same directory to make your life easier):
NOTE: It took my PC about 15 minutes to get past the parsing stage. I had thought it was locked up, but grabbed some coffee and was pleasantly surprised when I returned.
"<path_to_xjc.exe>" "<path_to_reqif.xsd>" -b "<path_to_linked_xjb_file>" -extension -p <the.package.name.you.want.to.generate.to>
Link to files I used to generate

Find exception line from Stacktrace in new version of code?

When I receive error Stacktrace either via Play Developer console or via Crashlytics, it looks something like this
Caused by: java.lang.ArrayIndexOutOfBoundsException:
at org.xxx.yyy.MainActivity.myMethod(MainActivity.java:483)
I can paste this content in Android Studio (Analyze -> Analyze Stracktrace) to get the Logcat output of the error.
The hard time happens when I click on the line 483 and it directs me to the empty space or some other method, because I changed that class after the reporting version was released and previous line 483 is now line 555 or 444. I then have to use the common sense to find the line in question.
Is there a way that Android Studio compares the Stacktrace with the current code and navigate me to the line 483 which existed when the release package was created? So I don't waste time searching where was the error line 7 days or 1 month ago.
I then have to use the common sense to find the line in question.
Or you can VCS here. If Crashlytics reports that the error was in 483-th line of MainActivity in the version 1.2.3 of your app, all you need to do is find the last commit made in 1.2.3 branch, update to this revision and take a look at the code in line №483.

Building vcxproj by MSBuild including logging to default log file specified in project or inherited from props file

When Visual C++ builds (vcxproj) file form Visual Studio or you build it by means devenv (building sln), then you get log form the build of the vcxproj in file specified by item BuildLog.Path.
Default value of this item is $(IntDir)\$(MSBuildProjectName).log
I’ve actually find this feature really useful for post build analysis per project.
I’d like to simulate this behavior by building just from msbuild.exe.
There are serious build automation reasons why I cannot use devenv now(as far as I’m aware I cannot build vcxproj by devenv without sln).
I've tried to resolve this problem by:
creating custom target that determines value of BuildLog.Path and returns it back
and then execute task Exec with msbuild commandline including argument that use filelogger to create log file
Problem is that it does not work!
There is an interesting thing that the default is specified by:
<ItemDefinitionGroup>
<BuildLog>
<Path>$(IntDir)\$(MSBuildProjectName).log</Path>
</BuildLog>
</ItemDefinitionGroup>
If I understood correctly this specifies metadata path for each BuildLog item.
By default there is no BuildLog Item (because there is no Include in vcxproj –for BuildLog Item).
Does anybody has solution for this problem or can explain how to solve it?
determine BuildLog.Path metadata or
build vcxproj file just by msbuild with logging file to log file specified in vcxproj or inherited from props file

File Not found exception in opening a jar file after i make the jar file using command line arguments

The problem statement:
I have a J2ME app and i have a separate struts program running. The program automatically changes the source of the J2ME app an then builds it, pre-verify it, and then package it using command line arguments. To achieve all this i have used "Runtime.getRuntime().exec" in my program. Problem is that if i introduce a delay of one sec before the command for packaging is executed, the jar file is still formed BUT accessing the jar file using the command "DataInputStream in = new DataInputStream(new FileInputStream(f));" gives me File Not found exception. "f" is the path to the jar file and i have checked it using "f.getCanonicalPath()" that its the right path.
I don know what the problem is. Please help me. I thank you in advance.
Are you waiting for the Process spawned by Runtime.exec() to complete before accessing the jar file? You can use Process.waitFor() for instance to halt the execution of your thread.

wxWidgets wxBitmap

Im trying to create toolBar. I added resource file to the Visual Studio project, then added to that resource png file.
Now the question is how to use it as a icon for the button?
this is my code:
wxBitmap exit(wxT("cross.png"));
and when I run application I have error:
Cant load "cross.png" bitmap from resource. Please check .rc file
thanks for help
First you need to make sure you use the actual name of the resource as defined in your RC file (maybe just "cross" instead of "cross.png", as the error states - check your RC file). Second, you'll also need to make sure you have initialized all image handlers if you haven't already (just call wxInitAllImageHandlers()). Third, you'll need to specify the image format type when you call the wxBitmap constructor, for example:
wxBitmap exit(wxT("cross"), wxBITMAP_TYPE_PNG);

Resources