material-design

Import new Android Design Support library

喜夏-厌秋 提交于 2019-12-08 15:07:57
问题 Hi i'am trying to import the new android support library like this com.android.support:support-design:22.0.0 but i got this error after sync the gradle : failed to find 回答1: You have to update your Android Support Repository in SDK Manager, then just add this dependency to your build.gradle : compile 'com.android.support:design:22.2.0' com.android.support:support-design:22.0.0 is wrong. 回答2: dependencies { implementation 'com.android.support:design:28.0.0' } 回答3: The docs has it wrong. It

ViewPager - In the fragment pages create a new fragment

妖精的绣舞 提交于 2019-12-08 13:33:03
问题 I have a ViewPager activity. The ViewPager also has a TabLayout with 3 tabs: FragmentA , FragmentB , and FragmentC , each corresponding to one of the 3 pages to be shown in the ViewPager . Inside of FragmentB though I will have a button. I now need to be able to click this button and have a new fragment created, FragmentD , which will overtake FragmentB . This new fragment needs to have an action bar with the back arrow so it can go back to FragmentB . The tabs should still show that

material ui Installation configure

不打扰是莪最后的温柔 提交于 2019-12-08 13:17:31
USER MATERIAL ui 1.jsx var React = require('react'), mui = require('material-ui'), RaisedButton = mui.RaisedButton; var MyAwesomeReactComponent = React.createClass({ render: function() { return ( <RaisedButton label="Default" /> ); } }); module.exports = MyAwesomeReactComponent; browserify 1.jsx -o 1.js Error: Parsing file C:\Users\wzx\AppData\Roaming\npm\1.jsx: Unexpected token (7: 11) at Deps.parseDeps unknow <RaisedButton label="Default" /> github : https://github.com/callemall/material-ui 1 npm install material-ui 2 Then how to do? 3 ... 4 .... i what should i do next? i need help, i have

Android appcompat button style not working

我的未来我决定 提交于 2019-12-08 12:03:44
问题 This is my base theme for application: <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorSecondaryLight</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:buttonStyle">@style/NormalButtonStyle</item> <item name="buttonStyle">@style/NormalButtonStyle</item> </style> And this is NormalButtonStyle: <style name=

View which can be pulled up with a floating action button like google maps app

流过昼夜 提交于 2019-12-08 11:56:19
问题 I am trying to make something seen in Google Maps App when one clicks on a POI on the map a view comes up having a floating action button anchored to it. In my scenario it is like this but there is already a FAB which is already visible and when an action is triggered a small view is visible with an anchored FAB showing some details and when it is pulled up it covers the screen just like an activity (something visible in the aforementioned google maps app). I am compiling the app with SDK

How to use shared element transition between FirstFragment (including RecyclerView) and SecondFragment

╄→尐↘猪︶ㄣ 提交于 2019-12-08 09:51:02
问题 I could implement shared element transition between two fragments WITHOUT RECYCLERVIEW!!! This is FirstFragment: public class FirstFragment extends Fragment { ImageView img_small; LinearLayout layout_ofc_cities; LinearLayout layout; public FirstFragment() { // Required empty public constructor } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle

Customized circular checkbox in Android

不想你离开。 提交于 2019-12-08 08:56:27
I am trying to get the Google apps photo select UI .. Am using Appcompat checkbox to achieve that with out success. The steps I am working on , 1. Set the checkbox background to custom circular shape 2. define custom shape in xml This is my check box xml looks like , <android.support.v7.widget.AppCompatCheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/checkBox" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:button="@drawable/custom_checkbox" android:background="@drawable/checkbox_drawable" /> My custom

Material UI change Input's active color

早过忘川 提交于 2019-12-08 08:00:01
问题 How do I change the color of an active input? I'd like to change the default blue one but cant find how to. From what I've tried it's not a matter of color attribute, neither in the FormControl, the InputLabel or the Input. Also there is no underlineStyle prop available (docs) I'd like to change the color only when the input is active, that is to say the user is writing in it, to my primary color as defined in my theme . I'm using Input and not TextField because I want to use InputAdornments

No toolbar elevation shadow on Android 9

左心房为你撑大大i 提交于 2019-12-08 06:45:14
问题 I'm struggling to make toolbar shadow appear on Android 28+. I tried multiple solutions suggested, but none worked. Following styles work well for all devices below 28: toolbar.xml <?xml version="1.0" encoding="utf-8"?> <androidx.appcompat.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" style="@style/Widget.App.Toolbar" android:layout_width="match_parent" android:background="?attr

I want to set a transparent background layer when I click on the floating action menu.

筅森魡賤 提交于 2019-12-08 06:01:44
问题 This is what I have done so far. Created FloatingActionButton. Now As the + icon is pressed a translucent layer should be there at the back. <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.getbase.floatingactionbutton.FloatingActionsMenu android:id="@+id/actionMenu" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true"