material

md-sidenav toggle() is on top of the md-toolbar

怎甘沉沦 提交于 2019-12-06 20:19:19
问题 I want to be able to toggle a sidenav without hiding the top left part of the md-toolbar, similiar to how Google Inbox works: It seems like the toggle function is causing it, because without the animation, the sidenav in showing underneath the md-toolbar. Is that possible? <body layout="column" ng-controller="mainCtrl"> <md-toolbar layout="column" class="md-medium-tall"><span flex="flex"></span> <div class="md-toolbar-tools"> <md-button class="menu" ng-click="toggleLeft()"> <md-icon md-svg

AppCompat ShareActionProvider icon is too big compared to other icons

最后都变了- 提交于 2019-12-06 18:24:40
问题 I changed the ActionBarSherlock to AppCompat v7. I already did all the changes that are needed to make it work, but something weird is happening with share icon (which is using ShareActionProvider). The share icon is too big compared to other icons. I also use the support library for my search, and its size is correct. The problem is just with the share icon. my_menu.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:moblee="http://schemas.android.com/apk/res-auto" >

load: id=gralloc != hmi->id=gralloc

僤鯓⒐⒋嵵緔 提交于 2019-12-06 14:37:10
I want use Material Design in my App, so I change AndroidManifest.xml just like: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zdr.umarket" > <uses-permission android:name="android.permission.WRITE_SETTINGS"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@android:style/Theme.Material.Light" > <activity android:name=".MainActivity" > <intent

Extending Activity or ActionBarActivity

情到浓时终转凉″ 提交于 2019-12-06 14:04:40
I'm creating an app which includes support for Android Lolipop and earlier versions. Based on Maintaining compatibility documentation i planned to use ActionBarActivity with AppCompact for non Lolipop devices and FragmentActivity with material for Lolipop devices. I created two different value folders. Now the problem is how should i extend my Activity class with MyActivity extends Activity or MyActivity extends ActionBarActivity If i use Activity. It crashes on earlier android version and saying me to add ActionBarActivity and the vice versa happens for lolipop EDIT ------ values-21 <style

How can I force Angular 7+ Material Autocomplete to enter letters only provided by a data source?

自闭症网瘾萝莉.ら 提交于 2019-12-06 09:53:35
问题 Edit: There are some workarounds as posted below (see answers) for template-driven forms. (I am looking for a solution for reactive forms). How can I force Angular Material Autocomplete to enter letters only provided by a data source? >> See the whole app here at stackblitz.com "Adel" is initial value and it is provided by the options-array: options: User[] = [ {name: 'George Michael'}, {name: 'Aretha Franklin'}, {name: 'Adel'}, {name: 'Janet Jackson'}, ]; The auto-complete works properly:

Angular2 material sidenav - changing rtl/ltr direction dynamically

Deadly 提交于 2019-12-06 09:27:09
I'm trying to change my layout dynamically according to users' language selection and switch from LTR to RTL on the fly. I'm using Angular 2 rc6, material 2.0.0-alpha.9-3 It looks like when the page is loaded, it works perfectly with either rtl or ltr. However, when it's changed dynamically from within the app (see plunker), the direction changes but the generated element md-sidenav-content has a miscalculated margin-right and margin-left. Digging further, I managed to see that the _dir object has an eventEmitter that should watch for on change events of _dir and recalculate the margins

创建Material Design风格的Android应用--创建列表和卡片

青春壹個敷衍的年華 提交于 2019-12-06 08:59:42
上次说过使用主题,应用Material Design的样式,同时卡片布局也是Material Design的重要组成部分,今天来写写。 引言 在程序中创建复杂的Material Design 样式的 List和Card,可以使用RecyclerView和CardView组件,这两个组件是在最新的support v7包(version 21)中提供的。因此需要引入依赖包: dependencies { compile 'com.android.support:appcompat-v7:+' compile 'com.android.support:cardview-v7:+' compile 'com.android.support:recyclerview-v7:+' } 创建List RecylerView组件是一个更加高效灵活的ListView。这个组件时一个显示大数据集的容器,可以有效的滚动,保持显示一定数量的视图。使用RecyclerView组件,当你有数据集,并且数据集的元素在运行时根据用户的操作或者网络事件改变。 RecylerView类简化大数据集的显示和处理,通过提供: 布局管理者控制元素定位。 在通用的元素上操作上显示默认的动画,比如移除和增加元素。 使用RecyclerView组件,你需要指定一个Adapter和布局管理器

初探three.js材质

…衆ロ難τιáo~ 提交于 2019-12-06 08:15:34
这节我们浅谈一下THREE的材质。材质就是物体的皮肤,决定物体的表面。THREE的材质有很多种,他们有的和到相机的距离有关,有的和面的法向量角度有关,有的不受光照的影响,有的受到光照的影响会产生反射效果或者漫反射效果,也可以将多个材质合成一个。 1. THREE.MeshBasicMaterial(基础材料)。 2. THREE.MeshDepthMaterial(深度材料)。 3. THREE.MeshNormalMaterial(法向材料)。 4. THREE.MeshFaceMaterial(面材质)。 5. THREE.MeshLambertMaterial(Lambert材质)。 6. THREE.MeshPhongMaterial(Phong材质)。 7. THREE.LineBasicMaterial(线性基础材质)。 8. THREE.LineDashMaterial(虚线材质)。 接下来我们详细的讲一下这些材质。 1.THREE.MeshBasicMaterial(基础材料) 基础材质非常简单,它不受光照影响。它常用的一些属性如下: - color 材质的颜色 - wireframe 设置该属性可以将材质设置成线框 - wireframeLinewidth 线框中线的宽度 - wireframeLineLinecap 线框线段端点如何显示 var mesh =

Alpha applied to floating action button creates weird circle?

夙愿已清 提交于 2019-12-06 07:10:20
In my app I am using a material design floating action button. Whenever I change the backgroundTintColor property of the button to something with an alpha below 255, it creates this strange circle within the button. I have provided a picture of the button below with my xml code... Any help would be greatly appreciated. <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|right|end" android:layout_alignParentBottom="true" android:layout_alignParentRight="true"> <android.support.design.widget.FloatingActionButton android:id="@+id

XF Android project does not build after adding Xamarin.Forms.Visual.Material nuget

五迷三道 提交于 2019-12-06 06:22:18
问题 I have a Xamarin Forms project and now I'd like to improve it with the new Visual / Material features. On IOS, it works like a charm. On Android I have strange problems: after adding Xamarin.Forms.Visual.Material nuget I get weird error messages and my project does not build: \res\values\values.xml(6): error APT0000: Attribute "statusBarBackground" already defined with incompatible format. \res\values\values.xml(2): error APT0000: Original attribute defined here. \res\values\values.xml(10):