在Eclipse的Andr​​oid材料设计材料、Eclipse、Andr、oid

2023-09-12 09:28:27 作者:胸有大志

有没有方法来创建与材质的设计在Eclipse中的应用程序。汉堡箭头动画,全屏幕高度抽屉式导航... 感谢您事先的任何sugestions。

解决方案

是的,你可以创建一个使用eclipse材料设计的应用程序。 请按照以下仔细每个步骤没有任何错误。

步骤:

创建一个新的Andr​​oid项目与目标SDK版本21.如果您的项目已经存在,那么只需要改变目标SDK版本。 添加Appcompat V7 lib添加到您的工作空间,并添加此LIB建设项目的路径。你可以找到这个LIB的SDK \演员\机器人\ SUPPORT \ V7。 设置项目构建目标21版 应该只有2个值文件夹中的资源文件夹中。 值 值-V21

值/ styles.xml应该如下图所示。

 <样式名称=AppBaseTheme父=Theme.AppCompat.Light.DarkActionBar>
         ....
         //此处是您的风格

< /风格>
 

值-V21 / style.xml应该如下图所示。

 <样式名称=AppBaseTheme父=@安卓风格/ Theme.Material.Light.DarkActionBar>

            ....
            //此处是您的风格
< /风格>
 

您可以找到不同的样式属性在这里https://developer.android.com/training/material/theme.html

在以下上面的步骤,你的应用程序将准备与材料的设计主题。

现在你就抽屉式导航栏的第二个问题,你可以使用下面的链接,简单,分步实施。

第1部分http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html4

第2部分http://www.android4devs.com/2015/01/recycler-view-handling-onitemtouch-for.html

此实现使用回收视图。对于需要回收视图LIB补充。(所在地 - SDK \演员\机器人\ SUPPORT \ V7)到您的项目,并将其添加到构建路径

Is there any way to create an app with Material design in Eclipse. Hamburger to arrow animation, full screen height navigation drawer... Thanks in advance for any sugestions.

解决方案

Yes you can create an app with material design using eclipse. Please follow each steps below carefully without any error.

Steps:

Create a new Android Project with Target SDK version 21. If your project already exists then just change the Target SDK version. Add Appcompat v7 lib to your workspace and add this lib to build path of your project. You can find this lib at sdk\extras\android\support\v7. Set Project build target to version 21. There should be only 2 values folder in res folder.

values values-v21

values/styles.xml should be as below.

<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
         ....
         // Your style here

</style>

values-v21/style.xml should be as below.

<style name="AppBaseTheme" parent="@android:style/Theme.Material.Light.DarkActionBar">

            ....
            // Your style here
</style>

You can find different style attributes here https://developer.android.com/training/material/theme.html

After following above steps, your app will be ready with material design theme.

Now your second question regarding navigation drawer you can use following link for simple and step by step implementation.

Part 1 http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html4

Part 2 http://www.android4devs.com/2015/01/recycler-view-handling-onitemtouch-for.html

This implementation uses recycler view. For that you need to add recycler view lib (location - sdk\extras\android\support\v7) to your project and add it to build path.

 
精彩推荐