Android Studio Rename Package

Android Studio Rename Package

How do you rename packages in new IDE Android Studio, based on intelijj ?Is there any automatic refactoring included? I want to make bulk refactoring but I don't know how. I worked 2 years with eclipse and in eclipse it's one click operatio

How to really read text file from classpath in Java

How to really read text file from classpath in Java

I am trying to read a text file which is set in CLASSPATH system variable. Not a user variable.I am trying to get input stream to the file as below:Place the directory of file (D:\myDir)in CLASSPATH and try below:InputStream in = this.getCl

Stop EditText from gaining focus at Activity startup

Stop EditText from gaining focus at Activity startup

I have an Activity in Android, with two elements:EditText ListViewWhen my Activity starts, the EditText immediately has input focus (flashing cursor). I don't want any control to have input focus at startup. I tried:EditText.setSelected(fal

Access-Control-Allow-Origin Multiple Origin Domains?

Access-Control-Allow-Origin Multiple Origin Domains?

Is there a way to allow multiple cross-domains using the Access-Control-Allow-Origin header?I'm aware of the *, but it is too open. I really want to allow just a couple domains.As an example, something like this:Access-Control-Allow-Origin:

How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?

How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?

I've created a simple Winforms application in C#. When I run the application on a machine with high DPI settings (e.g. 150%), the application gets scaled up. So far so good!But instead of rendering the fonts with a higher font size, all tex

How to retrieve and display images from a database in a JSP page?

How to retrieve and display images from a database in a JSP page?

How can I retrieve and display images from a database in a JSP page? 1:Let's see in steps what should happen: JSP is basically a view technology which is supposed to generate HTML output.To display an image in HTML, you need the HTML

How can I use the Parameterized JUnit test runner with a field that's injected using Spring?

How can I use the Parameterized JUnit test runner with a field that's injected using Spring?

I'm using Spring to inject the path to a directory into my unit tests. Inside this directory are a number of files that should be used to generate test data for parameterized test cases using the Parameterized test runner. Unfortunately, th

Which is the Spring equivalent for the CDI @Produces annotation?

Which is the Spring equivalent for the CDI @Produces annotation?

When I was working with CDI, I could use the @Produces annotation to create a producer method to be called to choose which bean that implemented an interface would be injected by the @Inject annotation .Now I am working with Spring, but I d

maven-compiler-plugin exclude

maven-compiler-plugin exclude

I have a following problem.I would like to exclude some .java files (**/jsfunit/*.java) during the test-compile phase and on the other side I would like to include them during the compile phase (id i start tomcat with tomcat:run goal)My pom

Run “mvn package” on “Build project” in Eclipse

Run “mvn package” on “Build project” in Eclipse

I have maven java project in eclipse. I right click project, choose "Build project" and I want "mvn package" get invoked automatically. Is it possible? 1:Rightclick on your pom.xml and choose "Run as" -> "Maven build.." and put in Goals:

maven install error - only whitespace content allowed before start tag and not \\u0

maven install error - only whitespace content allowed before start tag and not \\u0

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project ecommerce-web: Failed to install metadata com.app:ecommerce-web/maven-metadata.xml: Could not parse metadata C:\Users\ad

XDocument get XML element by the value of its name attribute

XDocument get XML element by the value of its name attribute

I have an XML result like this 0 16 firstname1 6557 Manager surname1 firstname2 6203 Director surname2

Launch Location Settings intent from preferences XML file

Launch Location Settings intent from preferences XML file

I want to launch System's Location Settings from an Intent. I know that programmatically it goes like thisIntent viewIntent = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);startActivity(viewIntent);but I need to do i

How to reference a drawable from a library project into a main project's layout in android?

How to reference a drawable from a library project into a main project's layout in android?

I have a android library project and reusable drawable resources in it. Lets say package name is: com.vijay.mylib;Then i have a main project and it uses the above library project.Lets say its package name is:com.vijay.myproject.Consider tha

How to get attribute value from node using xpath?

How to get attribute value from node using xpath?

Totally new to xpath.I have xml: To get value by index, i can use: string(/*/Value[1]/@CustomAtr)Is it possible to get value by key?Hot to get CustomAtr value where Value="b" ?Thank you 1:this should do the trick:string(//Value[@

onConfigurationChanged() not firing for keyboardHidden

onConfigurationChanged() not firing for keyboardHidden

I've followed the various questions and answers here to setup my Android activity to override the onConfigurationChanged() in order to execute logic when the soft keyboard opens and closes. Here's the relevant excerpts from my code. I've

Why am I getting error message “URI is not Registered”?

Why am I getting error message “URI is not Registered”?

I just installed Android Studio and everything ran fine but then I opened AS for a second time after my computer had turned off and I am getting the following error:"URI is not Registered"On the following lines of code:This is just the mani

XPath expression to find elements whose tag name contains 'Name'

XPath expression to find elements whose tag name contains 'Name'

I am a newcomer to XPath.I am looking for a way to get all elements whose tag name contains a particular string.For example, if I have XML like below, I want to get all the elements whose tag name contains the word 'Name'. i.e., I want to f

Change the action bar settings icon color

Change the action bar settings icon color

How can one change the color of the overflow icon in the action bar?(The most right icon) 1:You can use something like this @style/MyActionButtonOverflow @drawable/my_action_bTutton_overflowin your manifestfileIf you want to chane

Android get full width for custom Dialog

Android get full width for custom Dialog

in my application my created custom dialog dont have full height and i can not change and customize that.for example see this screen shot:My code:final Dialog contacts_dialog = new Dialog(ActivityGroup.this, R.style.theme_sms_receive_dialog

DialogFragment in Android with theme

DialogFragment in Android with theme

I'm building my first app in android. I've made a dialogFragment, but it doesn't look nice enough.For having a style and a theme I used this setStyle(DialogFragment.STYLE_NORMAL,0). What I want is that the edge of the fragment to be black l

In Maven, can I specify a relative path above my current project?

In Maven, can I specify a relative path above my current project?

I'm learning maven on the fly while doing work on a project with a large set of projects to build.Currently a line in the main build uses an absolute path to specify a directory that is part of the subversion repository but "above" it's dir

How to change a application Default Icon in PhoneGap [duplicate]

How to change a application Default Icon in PhoneGap [duplicate]

This question already has an answer here: How to add app icon within phonegap projects? 13 answers I am using phone gap do build an application for mul

Using @ComponentScan or  with only one class

Using @ComponentScan or with only one class

I'm maintaining a project with two set of main packages, the project is using Spring and Spring MVC, one of these packages contains several controllers and is scanned using XML configuration ().The problem is that there is a single class in

How do I safely join relative url segments?

How do I safely join relative url segments?

I'm trying to find a robust method of joining partial url path segments together. Is there a quick way to do this?I tried the following:puts URI::join('resource/', '/edit', '12?option=test')I expect:resource/edit/12?option=testBut I get the