material-design

Change style of Google Play Services AccountPicker dialog

放肆的年华 提交于 2019-12-07 10:31:37
问题 I am showing the AccountPicker dialog from Google Play Services with this code: String[] accountTypes = new String[]{"com.google"}; Intent intent = AccountPicker.newChooseAccountIntent(null, null, accountTypes, false, null, null, null, null); startActivityForResult(intent, REQUEST_CODE_PICK_ACCOUNT); It appears as a dark themed dialog even though I am using AppCompat v21 with Theme.AppCompat.Light . Is it possible to style the dialog? Preferably as a Material dialog on Lollipop but at least

BottomNavigationView not showing in my activity

╄→гoц情女王★ 提交于 2019-12-07 10:21:43
问题 I am implementing BottomNavigationView using this link i implemented everything step by step but my navigationview not showup at bottom of the screen. this is what i done. public class MainActivity extends AppCompatActivity implements ActivityCompat.OnRequestPermissionsResultCallback { Intent intent = null; BottomNavigationView navigationView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);

Changing default css in Angular Material for md-input

扶醉桌前 提交于 2019-12-07 09:29:49
问题 I have implemented form using angualr-material, I can't find any standard ways to change default color coding in material. form <div class="col-xs-12 testFormLabel"> <md-input-container class="testLabel"> <label>Reason</label> <input name="reasonBox" id="reasonBox" ng-model="obj. reasonBox" ng-required="true"> </md-input-container> </div> css .md-input-has-value. testLabel > input { color:#008cba; } Problem How can i change auto focus label name and underline to different color ( let say from

How to initializate a mat-slide-toggle of Material Design in Angular 5?

微笑、不失礼 提交于 2019-12-07 08:27:08
问题 I can't make the initialization of a mat-slide-toggle in a Reactive Form. I have something like in the template <mat-slide-toggle name="X" formControlName="X" color="primary"></mat-slide-toggle> and in the controller I am doing X: new FormControl(true, [ Validators.required ]) I have also tried with 1 or 0 or false instead of true but I didn't get it with a default value selected. I would appreciate if someone could help me, many thanks. 回答1: IMHO, there's some issue with your code. You

Material design input with bootstrap-4

孤街浪徒 提交于 2019-12-07 08:27:08
问题 I am creating a vue webapp and using bootstrap-4 as CSS framework. I want to have input fields like material design, But bootstrap have only older design of input fields with border on all sides and no floating label. What can be best way to get this done? 回答1: You should overwrite standard Bootstrap rules with one you need - very simple process. There are Bootstrap Material, but I think it's for version 3 http://fezvrasta.github.io/bootstrap-material-design/bootstrap-elements.html But you

How to write CSS keyframes to indeterminate material design progress bar

﹥>﹥吖頭↗ 提交于 2019-12-07 06:20:04
问题 I want to make an indeterminate progress bar as in material design (the second one) in CSS3 in a web page. Can anyone share the necessary CSS magic? I want it to behave exactly the same as on the video, so one end is accelerating while the other is slowing down until they switch. I could not find any existing example that would work this way. 回答1: I found a good example on CodePen. In case the link goes down, here is the code: body{ background:#ffffff; margin:50px 300px; } .slider{ position

Android Design Navigation Drawer - How to add a switch in nav xml?

﹥>﹥吖頭↗ 提交于 2019-12-07 05:02:44
问题 I am using the new Android Design Navigation Drawer. I want to add a switch in the drawer. Is there a away to implement this? this is the menu xml: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:id="@+id/nav_view_menu_group_1" android:checkableBehavior="single"> <item android:id="@+id/nav_view_menu_item_myschedule" android:icon="@drawable/ic_navview_my_schedule" android:title="@string/navview_menu_item_myschedule" android:titleCondensed="@string/navview_menu

Android: Scrolling issues with recyclerview inside a viewpager

巧了我就是萌 提交于 2019-12-07 04:20:35
问题 I have a RecyclerView inside a ViewPager that only occupies the bottom half of the screen, and what I want to do is have the entire screen scroll if the RecyclerView s received a vertical scroll event. UI hierarchy in a nutshell: CoordinatorLayout --- AppBarLayout --- Toolbar --- Bunch of static LinearLayouts, occupy most of screen --- TabLayout --- ViewPager --- Fragments with RecyclerView What I have : To my understanding, a RecyclerView is memory-efficient and tries to fit itself in

TextInputLayout error text padding

情到浓时终转凉″ 提交于 2019-12-07 04:00:42
问题 I am using TextInputLayout with AppCompatEditText having a custom xml shape based background for AppCompatEditText . Whenever i set some error , the error line starts from beginning of layout. Is there any way to give padding to that error line. 回答1: You can reference error TextView by using: TextView textView = (TextView) inputLayout.findViewById(android.support.design.R.id .textinput_error); Then you can get its layout params to work with. 回答2: <android.support.design.widget.TextInputLayout

setting minHeight in CollapsingToolbarLayout not having any effect

馋奶兔 提交于 2019-12-07 03:22:45
问题 The main problem I've currently got with the CollapsingToolbarLayout is, that whatever I'm trying, the minHeight attribute of my Toolbar does not have any effect. My desired result would be this: (The CollapsingToolbarLayout with a certain expanded height and a certain collapsed height (in the example 180dp), while the title either collapses or stays on the top) But whatever I do, the title sometimes is in the center, won't completely collapse or the minHeight is ignored anyway. I have tried