material-design

intent to activity in Side-Menu.Android of material design

自古美人都是妖i 提交于 2019-12-04 05:14:26
in https://github.com/Yalantis/Side-Menu.Android please help me :( How can when i click on each item in side menu, go to command "intent to other activity" instead of transport between images import android.content.res.Configuration; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import

Ripple effect on Spinner dropdown items colored background (appcompat-v7 V21)

倾然丶 夕夏残阳落幕 提交于 2019-12-04 04:58:08
I tried to apply ripple effect on Spinner dropdown items, like this: activity.java ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( this, R.array.array_name, R.layout.simple_spinner_dropdown_item); adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item); Spinner mSpinner = (Spinner) findViewById(R.id.spinner); mSpinner.setAdapter(adapter); simple_spinner_dropdown_item.xml <?xml version="1.0" encoding="utf-8"?> <CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/text1" android:layout_width="match_parent" android

Ripple effect on custom navigation drawer

自作多情 提交于 2019-12-04 04:49:42
I'm developing my first app providing to it the new material look. I'm a bit lost with this so I'm following some tutorials to implement things like Toolbar, Navigation Drawer, etc. I have to say that I'm doing it providing compatibility to pre-lollipop android versions, so I'm using support libraries. What concers to my question, is that I have just implemented the Navigation Drawer following one of this tutorials and using the following libraries for compatibility: support.v4.widget.DrawerLayout support.v7.widget.RecyclerView I think that the code implementation is too long to put it here,

Floating Action Button Icon not centered inside

喜夏-厌秋 提交于 2019-12-04 04:42:28
I'm trying to use a FAB but the icon inside is placing at bottom right of the button: FAB with icon not centered This is the FAB definition in the xml: <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/centerLocationButton" style="@style/Widget.MaterialComponents.FloatingActionButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_margin="@dimen/pro

Floating Action Button appears over Navigation Drawer

人盡茶涼 提交于 2019-12-04 04:21:05
So I am using https://github.com/neokree/MaterialNavigationDrawer for my navigation drawer and https://gist.github.com/Jogan/9def6110edf3247825c9 as my FAB implementation. When I open the navigation drawer, it does not cover the FAB, and the button appears on top of it. I would like to avoid hiding the button and showing it on drawer open/close as that is rather distracting. Any ideas on how to fix this? Edit: I am adding the FAB programmatically doing the following: fabButton = new FloatingActionButton.Builder(this) .withDrawable(getResources().getDrawable(R.drawable.ic_action_edit))

resetting reactive form triggers all required validators in Angular 6

拈花ヽ惹草 提交于 2019-12-04 03:51:20
问题 I am new to angular 6 ,Here I am trying to reset the form after submitting the data. Everything works fine but when I reset the form after successful data submit to database it triggers all the required validators in the form. I tried many ways to solve this but I couldn't solve it . Here after each form submission I want to reset the form and all the validators before enter the data in form fields for another submission. app.component.html <form [formGroup]="newMemberForm" (submit)=

Angular Material2 md-select dropdown appears at bottom of the page

荒凉一梦 提交于 2019-12-04 03:45:43
问题 I'm currently using Angular Material2 in an Angular 2.4.0 application (using @angular/material: 2.0.0-beta.1 ). For some reason, the md-select dropdown, instead of appearing over the initial value or placeholder or arrow to select the dropdown, as demonstrated in these examples from the material docs, appears all the way at the bottom of the page. To the point that if the md-select dropdown is at the top right of the page (the component I am attempting to place mine in is at the top right of

ImageView selectableItemBackgroundBorderless does not render outside of view bounds

喜你入骨 提交于 2019-12-04 03:33:45
I am using selectableItemBackgroundBorderless to add a ripple to an ImageView . My expected behaviour would be to have a circular ripple, extending the views size. Unfortunately the ripple gets cropped by the view bounds. How can this issue be solved? Default state: Pressed state: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/nav_instruction_container" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="wrap_content" xmlns:tools="http://schemas.android.com/tools" android:background="

Styling the SearchView Widget using support library v21

主宰稳场 提交于 2019-12-04 03:26:42
I'm trying to style the SearchView widget using the new AppCompat v21, but I'm facing some problems. No matter what layout I set on "suggestionRowLayout" attribute, it does nothing at all. The suggestion dropdown list of the SearchView remains the same way. Other problem that I'm having is when the "accent color" is the same color as the "primary color", in the searchview is impossible to distinguish where is the caret. Do you know how can I change the accent color in the SearchView to only be applied there? I've found that Play Music has the same problem. I'm following the guide from Android

Can I display material design Snackbar in dialog?

萝らか妹 提交于 2019-12-04 03:05:43
问题 I am developing an android application. In that I want to display material design Snackbar in dialog. Is it possible? If yes then how? Please help me. Thanks. 回答1: It's definitely possible, you just have to pass the View of the Dialog to the SnackBar . Example AlertDialog.Builder mAlertDialogBuilder = new AlertDialog.Builder(this); LayoutInflater inflater = this.getLayoutInflater(); // inflate the custom dialog view final View mDialogView = inflater.inflate(R.layout.dialog_layout, null); //