I am developing for android and I am using the Android Studio.I have many XML files and I never used the dimens.xml. Now I want to use it, but I don't want to go through the pains of creating a dimension for each view. I was wondering if there is a programming out there that can automatically do this, or if there is a function in Android Studio to create the dimension for every view that I have. Something simple, as in fewest clicks as possible. Otherwise, I might consider writing a script.
Sorry I know it was too late for the answer...There is no auto create dimension.But there is already dimension are created by a person.
Click this link to Download the dimension
here you can see different types of dimension for different screen size...
you can download individually or all together. Download and paste it in the res folder.
P.S: Please copy the dimens.xml from vlaues(in the site) and paste in your project res > values...
Update:there is also another way. Paste this code in gradle and sync
compile 'com.intuit.sdp:sdp-android:1.0.3
Hope It helps...
Related
I'm creating an application with a rather dynamic UI that allows users to add/change the positions of its views and layouts dynamically. If the user decides that current UI design satisfies him he would be able to save all views(buttons/labels/switches/etc.) of the activity into a list of "saved" activities. Is there a possible way to clone an activity or at least save the positions of all views and layouts? I saw that views have functions .getX() and .getY() but as far as I understood it is only within a layout.
Update
I found a solution that works. I created a simple Sqlite Database the stored the XY locations/names/text/id of all my views in to a table dynamically and then displayed them in a list of 'saved' configurations. The hard part is creating dynamically again all the views after you get the DB. If there is a request, I can also put some code up.
I'd create a base-activity, that has the functionality that both of your Activities need. This functionality would have to be slightly abstracted so that both activites could use this functionality by extending this BaseActivity and use it for their individual purposes.
If you post some code (the part of code both of your activities should have), I could update my answer to show you how that would look like in your case.
Further,
Step #1: Open the old project in Android Studio.
Step #2: Open the new project in Android Studio, choosing to open it in a new window (rather than the window you have from Step #1).
Step #3: Drag and drop the Java class files from the old project into the new project.
Step #4: Drag and drop the resources used by those Java classes from the old project into the new project.
Step #5: Find the elements from the manifest of the old project and copy those into the same basic location in the manifest of the new project.
I'm working on a project that requires taking pictures and putting stickers on that photo. From what I understand this requires 3 main actions:
1. User should be able to resize the sticker.
2. User should be able to rotate the sticker.
3. And once done, the whole thing should be merged into a single image.
I'm having a really hard time starting this since I simply don't know where I should start. Should I find, or ever write my own code to do the above, or maybe try to use existing projects (but I was not able to find any open-source ones).
I've heard about Aviary, but it was recently purchased by Adobe, and it is now part of the Creative Cloud, which is quite vague regarding the price, if there is any.
Where should I start?
Thanks.
We at Img.ly have released an image editing SDK for Android as part of our PhotoEditorSDK product suite.
Users can resize rotate and adjust stickers out of the box and you can also add your own stickers and assets.
You can find a demo application here. You can use the library for free in your open source projects, but there is a license fee for commercial applications.
For Resizing the image add two buttons one for increasing the image size and the other for decreasing . Then in the set an onClickListener() for that buttons.
Inside that function first get the dimensions of the image using getWidth() and getHeight() , then use setWidth() and setHeight() to change the size.
for Rotating the sticker refer this link
After all these things use a canvas to save the sticker and image as a single file . for doing this refer this link.
In future do not combine all your queries in a single question.
I use these libraries and plugins in my projects
for cropping an image use this : Cropper
for rotating an image you can use this: PhotoProcessing
and at the end you can get the whole image in to a single image-view
I was wondering how can anyone make graphics such as this one https://play.google.com/store/apps/details?id=com.surpax.ledflashlight.panel in android. By graphics iam referring to the interface. Did he use the eclipse or another tool?
Thanks in advance.
Probably used Eclipse for the programming, and created the images separately. The images are saved in multiple resolution and used automatically based on the resolution of the device. The images are easily added to the project by referring to them in the XML.
I am very new to android programming, migrating over from iOS and I am having a hard time.
So, I have set up a new application in Eclipse IDE with a fixed tab and swipe navigation. So it appears to have created a ActionBar. However, I need to change the content of each page rather than it just telling me which tab I clicked.
I have been searching for this for about, 30-45 mins now, and I cannot find anything which makes any sense!
How can I attach a new XML file to a view?
I think the code you are looking for is:
setContentView(R.layout.your_xml_file)
Make sure your xml file is in your res/layout folder in your project
As for your button listener, check this answer.
I don't know very much about Java (I know the basics). I want to create an Image Gallery with Netbeans, but I have absolutely no clue how to do this.
What I want to do:
The User should see all Images inside a specified folder (as thumbs) and should be able to view it in "original size" upon clicking on the Photo. Also (via a Button) he should be able to "transfer" an Image file to that folder.
So basically I have a database of misc. articles, each article has some Images in a unique folder on the Filesystem (eg. /images/art_01), I want to display all images within this folder and have the possibility to add (speaking, copying) new Images into this folder (there is no need to delete an Image) arranged, so it doesn't look too disgusting ;).
Since I just now the basics of Java, I qould appreciate if someone could help me, with something I can adapt directly into a JFrame - if that's possible.
Thanks ;)
With netbeans it's really easy, netbeans has a JFrame/JPanel drag&drop designer/gui builder (right click on package -> new -> JFrame form). After customizing the GUI you can make your main class extend your custom frame, or add a new custom panel to your JFrame, depending on whether you choose to make a JFrame or a JPanel.
http://netbeans.org/kb/docs/java/quickstart-gui.html some details on how to use the netbeans gui builder.
With this builder you can also add events to the different components. If you want to view a directory use JFileChooser.