Is it possible to have overlapping views in Android? I would like to have an ImageView with a transparent png in the front and another view in the background.
edit:
This is what I have at the moment, the problem is that the image in the imageView is not transparent, the parts that should be transparent are just black.
<RelativeLayout ...
Hi,
our project is based on Spring IoC which provides easy extensibility, meaning the functionality of our project is extended by what we call extensions (or plug-ins) that provide a few additional Spring xml configuration files + new code.
The problem is I have to somehow distinguish between beans that have been loaded from different ...
Since this question is back to four votes to close, I'm trying again to ask a more narrow question that hopefully the community will view more favorably.
Which specific design decisions in Java are documented to be done the way that they are not because that was the preferred design decision, but rather because it was necessary to suppo...
In Java, is there a simple way to extract a substring by specifying the regular expression delimiters on either side, without including the delimiters in the final substring?
For example, if I have a string like this:
<row><column>Header text</column></row>
what is the easiest way to extract the substring:
Header text
Please note ...
I have a rather large program that uses Hibernate for its ORM needs. Due to the age of the project it is using hbm.xml to configure it. I would like to convert it to annotations but I'm vary of investing days (weeks?) in manually adding the annotations and then testing everything.
Is there any tool out there that can help facilitate thi...
File file = new File("path to file alias foo");
where "path to file alias foo" is an alias reports file size to be 0 instead of the actual file size. I found a workaround to test for aliases:
public boolean isLink() {
try {
if (file.getAbsolutePath().equals(file.getCanonicalPath())) {
return false;
...
In the "hidden features of java" question, someone mentions that final initialization can be postponed and provides an example:
public Object getElementAt(int index) {
final Object element;
if (index == 0) {
element = "Result 1";
} else if (index == 1) {
element = "Result 22";
} else {
element ...
Hi,
I'm trying to process audio data. I'm working with Java.
I've extracted the audio data to an array. Now I should pass N data samples to a function that calculates the Discrete Fourier Transform (or Fast Fourier Transform, which is more efficient). I've read documentation but I'm getting more and more confused. What I'm trying to cal...
[EDITED - really sorry, the code I quoted was wrong - have changed the message below to reflect this. Apologies! Thank you for your patience.]
I'm new to regular expressions and want to match a pattern in Java (following on from this solution - http://stackoverflow.com/questions/962122/java-string-get-everything-between-but-not-includi...
I have a web site that is built with GWT 1.6. One of the nagging problems is that the image clear.cache.gif is displayed by one of the widgets, but it never goes away, and even bleeds through panels that are supposed to be on top.
Has anyone else had this problem? How did you fix it?
...
I'm evaluating Apache CXF for a project so I wrote a small demo application to try a few things out. Following the CXF user's guide, I was able to get my application up and running pretty quickly.
One thing I wanted to test was how well CXF is able to handle a method that returns a large array of primitives. So I defined a method 'flo...
ok; i am making a project for school and its a game similar to falling sand. but in order for the gravity to work i have to have the sand sorted by its position from down to up (the y variable of sand) this method should sort it; although i cannot get .clone() to work and i can't hard copy any other way i know. so i don't know how to rep...
Hi Gurus,
Is it possible to turnoff jsessionid in the url in tomcat? the jsessionid seems not too search engine friendly.
Please Advise
Thanks
...
The following doesn't work:
@Entity
class Owner {
@OneToMany(mappedBy="owner", cascade = {CascadeType.ALL})
protected Set<B> getBSet() {
..
}
}
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
class A {
@ManyToOne
public Owner getOwner() {
...
}
}
@Entity
class B extends A {
}
It causes an exception a...
Hi,
I'm somehow new to Java so my question can seem trivial, however i cannot find an answer to it anywhere in my books.
I want to initiatie a dialog with a user in which he would enter an arithmetic expression (ex. (2*x+y)) And then print out the result for such expression (for given values of x and y)
String EXPRESION = null;
E...
does this requirement conform to the J2EE Standards?
is there a easy way to implement this, log file gets generated by Log4J and in the end I will access the file system and email the whole file(s). can I access the file system?
...
I have this situation where I am reading about 130K records containing dates stored as String fields. Some records contain blanks (nulls), some contain strings like this: 'dd-MMM-yy' and some contain this 'dd/MM/yyyy'.
I have written a method like this:
public Date parsedate(String date){
if(date !== null){
try{
1. cr...
I am attempting to create a Google Web Toolkit (GWT) application that also uses Google Gears, but every time I try to remove the panel, I get an exception and the panel stays there.
Here is an excerpt from the exception I get (I've only included the relevant bits of the call stack, the rest just descends into the included function below...
I'm trying to compile a very simple program in Java 1.6 on Ubuntu Jaunty, using Apache Commons Config jar. I keep getting the "package org.apache.commons.configuration does not exist" error, even though the jar is in the same directory. Any ideas?
Directory Listing
~/source/UpdateStockHistory$ ll
total 304
-rw-r--r-- 1 crosse cros...
I'm already a developer it is my day job, and I've made a decent business out of it. I'd like to learn Java, but all the tutorials seem to start out as if the only language I know is English. Are there any good resources for a programmer to learn Java?
...