草庐IT

Material-Animations

全部标签

android - 如何在 Material Design 的 ActionBar 下获取进度条?

MaterialDesignspecificationsforProgressandactivity特别是在几个区域显示一个水平进度指示器,其厚度仅低于我们现在所说的ActionBar(可能是工具栏)。但是,我看不到任何实际实现MaterialDesign部分的方法。设计与现实之间似乎存在脱节。为了让事情变得更复杂,所有经典方法(例如setProgressBarIndeterminateVisibility())都已弃用或消失(即无操作)。此外,将水平ProgressBar放在工具栏下方会导致ProgressBar非常高,而且我能够找到的所有替代AppCompatProgressBar

android - 如何创建转换为单张 Material 的 float 操作按钮

我正在尝试查看设计库中是否存在任何内置动画以创建转换为单个Material表的float操作按钮,如Material设计图像中所示https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B8v7jImPsDi-TjBicTdvQjg4M1E/components-buttons-fab-transition_card_02.webm 最佳答案 使用MaterialComponents中的MaterialCont

android - Material Design 中的动画调整 View 大小

在不涉及layoutParams的情况下,是否有另一种方法来调整、折叠或展开View?我在新的MaterialDesign和新的AndroidDialerApp的一些视频中看到了动画。谷歌说Material可以很容易地改变形状、大小、旋转、颜色等……但我找不到任何东西。是否向后兼容?直到现在,为了调整大小、折叠或展开View,我们必须像这样使用layoutParams,例如:publicstaticvoidcollapse(finalViewv){finalintinitialHeight=v.getMeasuredHeight();Animationa=newAnimation(){

android - 使用 Material Design 在工具栏中滑动标签

我一直在使用thispost学习使用MaterialDesign使用滑动标签.我已经设法在Toolbar的下方实现了SlidingTabs,就像这样:但现在我想创建ActionBar/ToolBarFragmentTabs... 最佳答案 我能够准确地重新创建您想要实现的内容。我正在使用这个Library对于选项卡。这是我创建的View:通过依赖导入库或下载项目并手动导入compile'com.jpardogo.materialtabstrip:library:1.0.9'styles.xml@color/primary@color

android - 如何在 styles.xml android 中使用 android :Theme. Material(Material 主题)?

在我的应用程序中,我试图将android:Theme.Material实现为样式values-21文件夹中的父主题:@color/primary@color/text_primary@color/primary_dark@color/accent@color/primary_dark运行应用程序后,出现错误java.lang.IllegalStateException:YouneedtouseaTheme.AppCompattheme(ordescendant)withthisactivity.在值文件夹中。我有以下风格但是,如果我在values-21文件夹中添加相同的Theme.Ap

添加依赖项 com.google.android.material 后,Android Manifest Merger 失败

我们希望使用Google提供的最新MaterialDesignUI元素。因此,我在我们的项目gradle文件中添加了com.google.android.material:material:1.0.0-beta01。但从那以后我收到以下错误。Manifestmergerfailed:Attributeapplication@appComponentFactoryvalue=(androidx.core.app.CoreComponentFactory)from[androidx.core:core:1.0.0-beta01]AndroidManifest.xml:22:18-86isa

android - 如何在xml drawable中获取 Material 主题的原色?

我正在尝试定义需要Material主题原色的圆形可绘制对象。这是我的xml代码:但我遇到了InflateException。我读过我们不能在可绘制的xml中使用属性。那么有什么解决方法吗? 最佳答案 如果您使用的是API21或更高版本,您应该使用:对于较旧的API,您只需键入: 关于android-如何在xmldrawable中获取Material主题的原色?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.

android - 找不到与给定名称 '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar' 匹配的资源

我在尝试使用最新的GooglePlay服务SDK时遇到此错误:C:\ProgramFiles(x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5:error:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'@android:style/Theme.Material.Light.Dialo

android - 检索项目 : No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored' 的父项时出错

今天,我遇到了这篇文章中提到的错误:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'android:TextAppearance.Material.Widget.Button.Borderless.Colored'有趣的是(也是不同之处)——我们的应用程序已经投入生产5个月,到目前为止我们已经制作了数百个版本和APK。我们一周没有更改任何一行代码(也没有更改任何库版本)并且构建突然停止工作并出现这个提到的错误。Executionfailedfortask':react-native-fbsdk:pr

android - 如何在android Material Design中实现如下动画?

想在android中实现这个动画。感谢任何帮助。 最佳答案 我还没有测试过这个,但它应该可以工作。将此依赖项添加到您的应用程序gradle文件中:编译'com.github.ozodrukh:CircularReveal:1.1.1'在Activity开始时声明这些变量:LinearLayoutmRevealView;booleanhidden=true;将此添加到您的onCreate方法中:mRevealView=(LinearLayout)findViewById(R.id.reveal_items);mRevealView.s