I get a strange problem. When I open design-menu for redacting xml file (Activity or Fragment) I dont see elements(buttons, textviews etc).
Picture:
How can I fix this?
This looks like a render problem, please click on the top right red exclamation mark to see the exact error.
For the time being, you can change the display theme to resolve the problem. Click on AppTheme in the top menu, and choose another theme (I would suggest Material Light > Material.Light.DarkActionBar
Please see the image below:
Related
I want to make side bars like this (some of required dropdown) and with icon , I used android studio template layout but I not find yet how to add subitem to dropdown, and I try to use expandable list, but not find yet how to add icon,
the output hope like this, any idea?
I have created tabs for my application using this tutorial: http://www.android4devs.com/2015/01/how-to-make-material-design-sliding-tabs.html
I have done this successfully and now trying to change the colour of the tab when pressed. It seems to have a built in default colour and I have googled quite alot but found no answers.
I have found how to change the background colour of the actual tab but I need to change the background when pressed. Please can someone help me with this?
Note: this changed the background colour of the tab in normal state by adding it to the constructor of SlidingTabLayout
this.setBackgroundColor(context.getResources().getColor(R.color.ColorPrimaryDark));
Thanks,
Sam
Check here
But it suggest to use SmartTabLayout library which is better.
i'm developing an application for android that is already done for IOS, is not big problem.
the thing is that my boss want it to be exactly the same, but one of the menus is the problem, is like a slide menu but with zoom and a background image, anyone have any idea how can i do this, i already google it but no results :(, a library would help.
here is a picture with the menu for IOS.
I don't think if it would be an effective solution but you can use a RelativeLayout.
Put the selection part behind in a LinearLayout then put a framelayout front to contain list fragments. This way you shouldn't use an action bar to have absolutely same looking with iOs version.
When someone clicks open button apply an animation to your framelayout. scale it by %75 and move it 25% in y coordinate and move it %50 in x coordinate. When buttons in your LinearLayout apply a reverse animation to your FrameLayout. If swap button clicked change your fragment with new one. You can also aply a transaction animation to your fragments.
I hope you know how to handle this stuff. If no I can do my best to code an example.
EDIT:
Don't forget to set your flame layout unclickable when you move it to right side.
https://github.com/SpecialCyCi/AndroidResideMenu
I think I found your answer. I came across this in a list of libraries it is 3.8 on the list https://github.com/Trinea/android-open-project/tree/master/English%20Version
Cheers!
I am working on an app which requires me to make a layout something like this:
Here you could see a black button like view at the right bottom . I want this button to work as a sliding drawer type view.
when I drag this button this would happen:
How could I implement this .Please someone help me with this .
Where could I start from (Please give some link to source or example)?
i cant see ur images so edit ur link and try this one. http://blog.sephiroth.it/2011/03/29/widget-slidingdrawer-top-to-bottom/
I've implemented my own drawer after reading this very good article :
http://w2davids.wordpress.com/android-damn-that-sliding-drawer/
Good luck.
I'm currently making an android app in which I'd like the user to be able to change the background image.
I've got 3 images and a screen where I can choose a picture and a button for applying.
The issue:
I can allow the user to see all images in the way I want, but I don't know how to set the selected image as app background.
What I want to do:
I want the user to click a button, which exports the selected image to "bakgrund.png" in "/res/drawable-mdpi" and replaces the current one. This would allow me to easily integrate the background switcher. Renaming of current files also works.
PS: My current background images are located in /res/drawable-mdpi named 1.png 2.png and 3.png.
Easiest way would be to call the setBackgroundResource(image_id) method on the root layout. Like if you have a LinearLayout which has android:id="#+linear" as the root layout in the layout xml, then this code will help:-
LinearLayout linearLayout=(LinearLayout) findViewById(R.id.linear);
linear.setBackgroundResource(R.drawable.1);//call this in the OnClickListener's OnClick Method
Firstly, you need different themes which has different backgrounds. So you may use this.setTheme method in your Activity.
Indeed I suggest you, two different layout (with different backgrounds but have same components) and using setContentView during onClick.
I hope it solves your issue.