Giter Site home page Giter Site logo

kanytu / android-studio-material-template Goto Github PK

View Code? Open in Web Editor NEW
590.0 58.0 145.0 172 KB

A template for Android Studio to create applications with material design and Navigation Drawer.

Home Page: http://androidshenanigans.blogspot.pt/2015/03/material-design-template.html

License: Apache License 2.0

FreeMarker 100.00%

android-studio-material-template's Introduction

Android-studio-material-template

A template for Android Studio to create applications with material design and Navigation Drawer.

Installation

  • Copy the MaterialNavigationDrawerActivity folder to the template folder located in:

{Android Studio installation dir}\plugins\android\lib\templates\activities\

  • Restart Android Studio

Usage

  • Click File > New > New Project...
  • Type your Project Name. Click Next
  • Select Material Drawer Activity
  • Select the styles/layout you want in your application
  • Click Finish

More information on my blog: http://androidshenanigans.blogspot.pt

android-studio-material-template's People

Contributors

kanytu avatar kevindesai777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-studio-material-template's Issues

Problems on Adding More than One Material Drawer Activity to Same Project

I got these warnings on adding more than one Material Drawer Activity to Same Project, and i am afraid it will generate error and that must be corrected manually...

Ignoring conflict for the value: navigation_drawer_width wanted: "<dimen name="navigation_drawer_width">240dp</dimen>" but it already is: "<dimen name="navigation_drawer_width">320dp</dimen>" in the file: dimens.xml

The following file could not be created since it already exists: styles.xml

The following file could not be created since it already exists: row_selector.xml

The following file could not be created since it already exists: drawer_row.xml

The following file could not be created since it already exists: toolbar_default.xml

The following file could not be created since it already exists: NavigationDrawerFragment.java

If you proceed the resulting project may not compile or not work as intended.

Compatibility Issues

I just thought to post this here if anyone is interested to update the template:

  1. The ActionBarActivity is depreciated in 22.1.0, so line 15 of DrawerActivity :
    public class ${activityClass} extends ActionBarActivity
    should be updated with AppCompatActivity.

  2. in ScrimInsetsFrameLayout the getSystemWindowInsetBottom call requires api 20, an if statement to check the built would be better. something like this :
    if (Build.VERSION.SDK_INT >= 20) {....}

  3. fitSystemWindows is depreciated

Update: I just saw this topic #17 regarding first issue. @kanytu what do you mean it can't be done? I just replaced it with AppCompatActivity, did a clean build and everything worked fine.

Replace deprecated ActionBarActivity with AppCompatActivity

When creating an application from this template, the main activity is declared thus:

public class MainActivity extends ActionBarActivity

ActionBarActivity is deprecated and could be replaced with its replacement AppCompatActivity:

public class MainActivity extends AppCompatActivity

This is in file MaterialNavigationDrawerActivity\root\src\app_package\DrawerActivity.java.ftl, lines 6 & 15:

import android.support.v7.app.ActionBarActivity;

and

public class ${activityClass} extends ActionBarActivity

to

import android.support.v7.app.AppCompatActivity;

and

public class ${activityClass} extends AppCompatActivity

Sugestion

Anonymous
29 MAY 2015 AT 14:47
Excellent Class. Two feedback for your considerations:

  1. Add int ID in NavigationItem which is easier to handle in callback than the position
  2. Add getMenu method in NavigationDrawerCallbacks so that NavigationDrawerFragment is independent of application specific code. MainActivity can then manage the menu.

Refresh navigation drawer

Is there a way to refresh the navigation drawer? I have added if statements when building my menu items, so I just have to call onCreateView() again, so that it rebuilds the menu. I want to change my menu items whenever a user logs in and out.

Thank you.

Get "getSupportActionbar setTitle" to work

hi sorry to bother you im trying to change the title on each fragment without any success, ive tried changing it from main activity inside onNavigationDrawerItemSelected by using ActionBarActivity.getSupportActionBar.setTitle(onNavigationDrawerItemSelected(position)) this gives me an error that it cannot be referenced from a static context removing the ActionBarActivity call tells me it cannot resolve setTitle.
and ive tried changing it from the fragment by including the toolbar and changing the title like this
setTitle("My Title");
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
but again no success can you give me some help please?

startActivity ActionBar

Hello,

I'm not sure if my problem is with this library or not, but hopefully someone can point me in the right direction.

I have the MainActivity load a fragment, and from the fragment I click on an menuOptionBtn to launch a new activity. The new activity loads however, the ActionBar is missing.

How can I get the ActionBar to appear?

Thank you.

Layout problem in landscape mode

There is a minor bug with toolbar in landscape mode. The navigation drawer layout is a bit upper and the text becomes too small

Default text color is set to white

Default text color is set to white:

Fix (still need to check if it's the correct one):

Change in styles.xml

<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">

to

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

getAdapterPosition not resolving when first created

Line 43 and 47 of NavigationDrawerAdapter can't seem to resolve getAdapterPosition even after confirming a successful gradle build and the right support imports. Changing to the depreciated getPosition method lets the project build and work as expected.

Drawer is open everytime

If I close the app and remove it from recents then open it again drawer is open again as if its the first time running the app is this desired functionality

wrong line separators

Greetings,
I downloaded your example and followed the install instructions and am getting the following error:

Wrong line separators: '.../android\">\r\n    <ite...' at offset 65: Wrong line separators:  '.../android\">\r\n    <ite...' at offset 65
java.lang.AssertionError: Wrong line separators: '.../android\">\r\n    <ite...' at offset 65
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:66)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2209)
at com.intellij.openapi.editor.impl.DocumentImpl.assertValidSeparators(DocumentImpl.java:624)
at com.intellij.openapi.editor.impl.DocumentImpl.<init>(DocumentImpl.java:124)
at com.intellij.openapi.editor.impl.DocumentImpl.<init>(DocumentImpl.java:119)
at com.intellij.openapi.editor.impl.DocumentImpl.<init>(DocumentImpl.java:111)
at com.intellij.psi.formatter.FormattingDocumentModelImpl.createOn(FormattingDocumentModelImpl.java:73)
at com.intellij.lang.xml.XmlFormattingModelBuilder.createModel(XmlFormattingModelBuilder.java:42)
at com.intellij.formatting.CoreFormatterUtil.buildModel(CoreFormatterUtil.java:48)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.doProcessRange(CodeFormatterFacade.java:128)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processRange(CodeFormatterFacade.java:95)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processElement(CodeFormatterFacade.java:91)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:104)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:91)
at com.android.tools.idea.templates.Template.format(Template.java:956)
at com.android.tools.idea.templates.Template.instantiate(Template.java:853)
at com.android.tools.idea.templates.Template.access$500(Template.java:92)
at com.android.tools.idea.templates.Template$3.startElement(Template.java:486)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.android.tools.idea.templates.Template.executeRecipeFile(Template.java:473)
at com.android.tools.idea.templates.Template.access$300(Template.java:92)
at com.android.tools.idea.templates.Template$2.startElement(Template.java:449)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.android.tools.idea.templates.Template.processFile(Template.java:419)
at com.android.tools.idea.templates.Template.doRender(Template.java:273)
at com.android.tools.idea.templates.Template.access$000(Template.java:92)
at com.android.tools.idea.templates.Template$1.run(Template.java:252)
at com.intellij.openapi.command.WriteCommandAction$4.run(WriteCommandAction.java:178)
at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:168)
at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:115)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:117)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:112)
at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:33)
at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:80)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:85)
at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:175)
at com.android.tools.idea.templates.Template.render(Template.java:249)
at com.android.tools.idea.wizard.AddAndroidActivityPath.performFinishingActions(AddAndroidActivityPath.java:390)
at com.android.tools.idea.wizard.DynamicWizard$WizardCompletionAction.run(DynamicWizard.java:621)
at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:115)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:112)
at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:33)
at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:80)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:85)
at com.android.tools.idea.wizard.DynamicWizard.doFinishAction(DynamicWizard.java:428)
at com.android.tools.idea.wizard.DialogWrapperHost$FinishAction.doAction(DialogWrapperHost.java:323)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1719)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:787)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:463)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1557)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1524)
at com.android.tools.idea.wizard.DynamicWizard.show(DynamicWizard.java:463)
at com.android.tools.idea.actions.NewAndroidComponentAction.actionPerformed(NewAndroidComponentAction.java:108)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.Throwable
... 167 more

I'm using Android Studio 1.1 on Windows 7/Java 1.7.0_60

Seems like a simple install...not sure how i messed it up.

Change template location to sdk folder

Templates can also be added in SDK_FOLDER/extras/templates/activities

TODO:

create installer? bat/sh
Change readme
Check if eclipse reads FreeMaker templates too and if it will use this folder aswell

This way the template will not be removed on every AndroidStudio update

Unable to create project

I get this error in AS when clicking "Finish":
Wrong line separators: '.../android">\r\n <ite...' at offset 65: Wrong line separators: '.../android">\r\n <ite...' at offset 65
java.lang.AssertionError: Wrong line separators: '.../android">\r\n <ite...' at offset 65
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:66)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2209)
at com.intellij.openapi.editor.impl.DocumentImpl.assertValidSeparators(DocumentImpl.java:624)
at com.intellij.openapi.editor.impl.DocumentImpl.(DocumentImpl.java:124)
at com.intellij.openapi.editor.impl.DocumentImpl.(DocumentImpl.java:119)
at com.intellij.openapi.editor.impl.DocumentImpl.(DocumentImpl.java:111)
at com.intellij.psi.formatter.FormattingDocumentModelImpl.createOn(FormattingDocumentModelImpl.java:73)
at com.intellij.lang.xml.XmlFormattingModelBuilder.createModel(XmlFormattingModelBuilder.java:42)
at com.intellij.formatting.CoreFormatterUtil.buildModel(CoreFormatterUtil.java:48)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.doProcessRange(CodeFormatterFacade.java:128)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processRange(CodeFormatterFacade.java:95)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processElement(CodeFormatterFacade.java:91)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:104)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:91)
at com.android.tools.idea.templates.Template.format(Template.java:956)
at com.android.tools.idea.templates.Template.instantiate(Template.java:853)
at com.android.tools.idea.templates.Template.access$500(Template.java:92)
at com.android.tools.idea.templates.Template$3.startElement(Template.java:486)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.android.tools.idea.templates.Template.executeRecipeFile(Template.java:473)
at com.android.tools.idea.templates.Template.access$300(Template.java:92)
at com.android.tools.idea.templates.Template$2.startElement(Template.java:449)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.android.tools.idea.templates.Template.processFile(Template.java:419)
at com.android.tools.idea.templates.Template.doRender(Template.java:273)
at com.android.tools.idea.templates.Template.access$000(Template.java:92)
at com.android.tools.idea.templates.Template$1.run(Template.java:252)
at com.intellij.openapi.command.WriteCommandAction$4.run(WriteCommandAction.java:178)
at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:168)
at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:115)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:117)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:112)
at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:33)
at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:80)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:85)
at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:175)
at com.android.tools.idea.templates.Template.render(Template.java:249)
at com.android.tools.idea.wizard.NewFormFactorModulePath.performFinishingActions(NewFormFactorModulePath.java:282)
at com.android.tools.idea.wizard.DynamicWizard$WizardCompletionAction.run(DynamicWizard.java:621)
at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:115)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:112)
at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:33)
at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:80)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:85)
at com.android.tools.idea.wizard.DynamicWizard.doFinishAction(DynamicWizard.java:428)
at com.android.tools.idea.wizard.DialogWrapperHost$FinishAction.doAction(DialogWrapperHost.java:323)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1719)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:787)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:463)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1557)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1524)
at com.android.tools.idea.wizard.DynamicWizard.show(DynamicWizard.java:463)
at com.android.tools.idea.actions.AndroidNewProjectAction.actionPerformed(AndroidNewProjectAction.java:45)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.Throwable
... 168 more

can't select item

i have a problem, when i click on a item, sometimes, i can't select.

The text change color on hover, but item don't change.

Better one long explain, i have make a repo : https://github.com/thib3113/EVA-Android
the bug is not very visible with emulator, but i can see this on my nexus 5 5.1
thank you for help

Drawer layout scrolls behind image view

The gmail style layout from template scrolls behind or underneath the image header how could I put one in the other so the header scrolls away when scrolled up?
Also..
Calls first fragment when rotated but I'll fix this

Tablayouts

Add templates for tablayouts
also tablayouts + nav drawers at the same time.

Item Dividers

Does anyone know a way to add a horizontal divider between items?

Thank you.

Duplicate menu items

Olá Pedro!
When there are more options added to menu so they are scrollable, the menu items are duplicated, one set stay in place, another is scrollable. I used the following flow:

  1. Open the app
  2. Open the menu and scroll it -> everything should be fine
  3. Click on one of the options so the fragment is changed
  4. Open the menu again and scroll it -> options are duplicated.

Bellow is a link to a video to be more explicit http://apollo.eed.usv.ro/~pahomi_a/for_pedro_o.html.
The appears on LG G3, Nexus 4, both running Android L. Works fine on Samsung Galaxy S4, S5(Android L for both), Samsung Note - N7000, Note 2, Samsung A3, A5.

support froyo ?

Is it possible to support Android 2.2 (level 8)?

drawer_row.xml uses

android:background="?android:attr/selectableItemBackground"  

which requires level 11 rather than 8

Wrong line separators again but line 635

I'm using Android studio with mac os x, when i try to add Template it say:
Wrong line separators: '...e License.\r\n-->\n\n\n\n<re...' at offset 635 (show balloon)

please help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.