material-design

Change style of Google Play Services AccountPicker dialog

不羁的心 提交于 2019-12-05 17:30:51
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 make it a light dialog to match my app. I think, no need to "hack". It can be achieved easier: ...

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

自古美人都是妖i 提交于 2019-12-05 17:27:54
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. IMHO, there's some issue with your code. You should do something like this: <mat-slide-toggle [formControlName]="X" [checked]="X.value" (click)="X.value =!X

can't get my location and location button not show

让人想犯罪 __ 提交于 2019-12-05 17:09:30
after i make drawer menu and floating button why my maps can't get my location and location button not show, and why the search place button when it clicked so that force stop? before i add drawer menu and floating button, it's all okay.. Before After activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" tools:context="com.emergency.MainActivity" android:layout_width="match_parent" android:layout

Material design input with bootstrap-4

倖福魔咒の 提交于 2019-12-05 15:55:50
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? 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 can take rules from here, for partial that you need, and paste it to your custom CSS. You may customize what

BottomNavigationView not showing in my activity

孤街醉人 提交于 2019-12-05 15:47:18
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); navigationView = (BottomNavigationView) findViewById(R.id.navigation); navigationView

Android full screen dialog fragment like calendar app

China☆狼群 提交于 2019-12-05 14:02:17
I am trying to achieve a full-screen dialog like the below image. I am able to show a full screen dialog but when the dialog is shown the status bar color changes to black and does not keep the primary-dark color. Heres my dialog fragment public class IconsDialogFragment extends DialogFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout to use as dialog or embedded fragment return inflater.inflate(R.layout.fragment_icons_dialog, container, false); } @Override public Dialog onCreateDialog(Bundle

Changing default css in Angular Material for md-input

99封情书 提交于 2019-12-05 13:40:32
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 dark blue to green ) You can use this selector to change the input: md-input-container:not(.md-input

How to remove this gray color from topbar/status bar

不想你离开。 提交于 2019-12-05 12:40:52
I have an app where I have set the top bar / status bar to ascent colors, its working for most screens on lollipop but having an issue on one of the screen its an activity. The code is as follows: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.realsales.reatsalesapp.activities.EditContactActivity"> <android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbarEC" android:layout

AppBarLayout CollapsingToolbar how to disable expand on EditText click?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 12:14:09
In my test app I disable expansion of AppBarLayout when it is collapsed (by scrolling RecycleView ). I do that by adding addOnOffsetChangedListener to AppBarLayout . However, when I click EditText it expands again but, I do not want it to expand. How to disable the expansion of AppBarLayout when I click EditText ? I have put the whole code, so that everyone can copy/paste the code, create new project and test this fast. Here is how the .gif looks Here is XML code: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com

“Failed to convert ?attr/colorPrimary into a drawable”

谁说我不能喝 提交于 2019-12-05 11:30:17
I am starting a new project, so the project is more or less "empty". I just added a MainActivity, with a MainActivityFragment. I haven't added any code at all to them. Now, I edit the styles.xml so it looks like this: <resources> <!-- Base application theme. --> <style name="MyTheme" parent="@android:style/Theme.Material.Light.DarkActionBar"> <item name="android:windowNoTitle">true</item> <!--We will be using the toolbar so no need to show ActionBar--> <item name="android:windowActionBar">false</item> <!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color