I recently updated to Android Studio 2.3 and there is now a bar between the editor window and the tabs bar that displays the objects within a file
but most of the time it's just empty space.
There is no context menu when I right-click on the new bar and I cannot seem to find any mention of it in the android studio guide. There doesn't even seem to be an acknowledgment of it in their own screen shot.
This feather is called Breadcrumbs and was introduced in IntelliJ IDEA 2016.2
Breadcrumbs: Until now breadcrumbs were only available in HTML and XML code. Now breadcrumbs work for Java, too, where instead of tags they let you navigate through classes, lambda expressions and methods.
it's a pretty useful feather but if you don't like it you can disable it by going to Settings/Editor/General/Appearance/Show breadcrumbs.
Related
This is what my palette looks like, I want to know how to add other tabs like design and appCompact.
Thank you
I'm not sure I understand what you are asking. The palette cannot be modified and is a container for components such as button, texts, etc.
Please refer to this for intro into Android Development.
AppCompact is a support library that allows for themes, colors, widgets, etc. to run on earlier devices i.e. backward compatibility.
The design view is accessed through the res folder in the layout folder. By default, called activity_main.xml.
You should go through the basics of android development so you can understand the structure, components and overview of android Studio.
EDIT:
See this link which shows you how to create custom view components
Please view this link which goes over the entire overview of the UI and how to use and customise the UI layout design(Very Useful!).
The folks that works on Android Studio redesigned the Palette window in Android Studio 3.1.2. Some of these widgets have been completely taken out.
"There is a new "Legacy" section and the "Advanced" section has gone. Along with it the NumberPicker, DataPicker, TimePicker, TextClock, Chronometer and, as far as I can see, the Transitions category has gone completely along with all its widgets."
"If you rely on any of the missing Widgets then my advice is don't upgrade until a workaround has been made available. There is no word from the Android Studio team as to why these widgets have been removed and no word on how to put them back."
I'm new to Android Studio and I am trying to create a note app. However, I can't seem to interact with my action bar at all.
I am using the latest version of Android Studio. I was looking some tutorials of Android Studio, videos of one year ago, and in the videos, the app emulator showed 3 dots (the settings icon) on the top-right corner of the action bar. However, mine doesn't create it. It doesn't create any menu icon. In fact, I do NOT have a menu sub-folder on my RES folder, and my MainActivity.java does NOT have the onCreateOptionsMenu and onOptionsItemSelected methods that should be created by default.
Any way I can fix this? How can I add a simple icon my action bar?
Thank you
You can add these methods manually by clicking CTRL+O (shortcut for override methods) and choose these two methods from the list.
You can also write them from scratch or copy-paste them from somewhere.
EDIT:
Try all the different templates in the New Project menu. Maybe some of them works for you. And good luck. This appears to be some weird bug.
I am currently learning how to make Android apps, using a textbook to guide me through some basic apps. The text teaches you how to change the layout and layout properties via the "Outline" window, but it appears that the outline window is either hidden or has been replaced by the "Component Tree" window. Is there a way to bring back the Outline window?
I'm using Android Studio 1.5.1 on Windows 10.
Textbook is called "Android for Programmers: An App-Driven Approach, 2/e"
Thanks!
The outline view in old eclipse-based Android Studio versions is not a part of itellij used in modern Android Studio, and its functionality is replaced by other components.
for layouts and layout XML
The component panel in more recent Android Studio builds replaces the outline view. The properties associated with an element are shown in a tree view just below the component list when viewing a layout.
for code
Alt+7 Structure view will produce a docked window on the left side (replacing the project tree) that shows the structure of the code.
for /res/values/strings.xml specifically
Unfortunately they didn't create a resources view that works in general (that I am aware of), but the strings.xml file has a translation assistance that you can open by clicking "open editor" which does add a gui to the XML.
In Android Studio, a component tree is available in the bottom left hand corner of the Palette. I think that this is functionally equivalent to the Outline in Eclipse.
I am trying for last 3 days to show up my custom view properties in my Android Studio Design Panel, so I can directly edit custom properties of my view directly from the design editor and my supervisor can create an app without any coding knowledge by dragging a view in editor and simply editing its properties from the designer panel.(without modifying XML code. It is a very simple app, so I think its just okay).
However, it seems I have no luck. I have asked one question on it, got only one reply and its also not working. The question is here:
Does Android studio layout editor shows custom view properties?
I have checked almost all custom properties of views in android tutorials, downloaded source codes and find that none of these was able to show up the custom properties in android design panel.
So now, I have big doubt, if it is actually possible to show up any custom properties for a view in Android Studio. Its a bit strange that there is no single discussion/tutorial on it in online. Every tutorial suggests, how to create custom properties using xml layout or code, but none discussed, how to show up that in android studio. I believe, andoid studio can only show up default properties set for a view and we have to edit custom properties by editing XML files only.
Can you please tell me if its correct? I am really very frustrated with it and want to leave it now. If any of you got succeed to bring custom properties of views in Android Studio editor, I will be very grateful, if you kindly reply/answer.
Select the below API level than current in that designer panel.
I thought ADT should come with a visual editor for building GUI : Easy way to build Android UI?
However, I just cannot find it. I was wondering where is the Visual Editor for Eclipse with the ADT plugin.
I can run HelloWorld application without problem. However, whenever I click on main.xml at the left navigation tree layout folder, here is what I get. What I wish to get is a WYSIWYG editor.
Select your main.xml file. At the bottom of eclipse you can see a Layout tab, click on it and eclipse will open the android gui editor.
As Paul Kearny previously noted, to resolve issue with seeing "Design" tab instead of "Graphical Layout" follow these 2 steps:
1) Delete project from the left of the screen, without deleting the source files
2) File -> Import -> Existing Projects into Workspace, browse and select your workspace folder and open your project
Graphical Layout problem fixed!
If you want to edit the layout visually, rather than through XML, click on the Layout tab at the bottom left of the main.xml window (in your screenshot, just above Problems).
Also note, there are issues with displaying some of the widgets. For example, the ListView does not render. So, my hint is to change ListView to just a View, then work out the details of the layout so you can get the colors, relative-ness, etc. Then switch it back to ListView. There is one other widget that I cannot recall off the top of my head ...
To resolve issue with seeing "Design" tab instead of "Layout" or "Graphic Layout", I had to:
1. Delete the project from Eclipse without deleting the source
2. Shut down and restart Eclipse
3. Import the project back in
You could probably skip step 2, but I did it just to make sure.
Hope this helps anyone else who has the same issue.
If your view is showing Design|Source for the .xml file right click on the main.xml and select open with - android common XML editor. Simple.
If it is happening to one particular xml, you can delete the file (make sure you copy the content first), create new xml and paste the content again.
I recommend that any serious Android developer stay far, far away from Eclipse/ADT Design View. This is a time-wasting tool that sorely lacks the attention it would need from Google to make it worth serious consideration. It doesn't render the views as a real device would. There is no way to bind dynamic data. Does it work with fragments (I think not)? For it to work properly and have useful features would weigh down Eclipse further and make it unacceptably slow. In my very humble opinion, the entire strategy for ADT's ui-design tools has failed.
Thus, the recommendation is: edit Android XML layout files by hand and use the only reliable testing mechanism you have for layouts: actual devices. You can always fallback on the emulator - but the emulator performs 50x - 100x slower than an actual device. I'm not exaggerating. Pick your poison!
new fix, took me forever to get this fixed, really simple....delete the xml file and undo the deletion (ctrl+z), double click and there you go. Hope this helps someone as it did me. No shut down required.
If you see "Design" tab instead of "Graphical layout", just close the project and open it again.