kandi background
Explore Kits

RippleEffect | Ripple effect from Material Design for Android API 9 | Android library

 by   traex Java Version: Current License: MIT

 by   traex Java Version: Current License: MIT

Download this library from

kandi X-RAY | RippleEffect Summary

RippleEffect is a Java library typically used in Mobile, Android applications. RippleEffect has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
Implementation of Ripple effect from Material Design for Android API 9+
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • RippleEffect has a medium active ecosystem.
  • It has 4960 star(s) with 1106 fork(s). There are 203 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 49 open issues and 65 have been closed. On average issues are closed in 188 days. There are 5 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of RippleEffect is current.
RippleEffect Support
Best in #Android
Average in #Android
RippleEffect Support
Best in #Android
Average in #Android

quality kandi Quality

  • RippleEffect has 0 bugs and 0 code smells.
RippleEffect Quality
Best in #Android
Average in #Android
RippleEffect Quality
Best in #Android
Average in #Android

securitySecurity

  • RippleEffect has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • RippleEffect code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
RippleEffect Security
Best in #Android
Average in #Android
RippleEffect Security
Best in #Android
Average in #Android

license License

  • RippleEffect is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
RippleEffect License
Best in #Android
Average in #Android
RippleEffect License
Best in #Android
Average in #Android

buildReuse

  • RippleEffect releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • RippleEffect saves you 362 person hours of effort in developing the same functionality from scratch.
  • It has 865 lines of code, 56 functions and 22 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
RippleEffect Reuse
Best in #Android
Average in #Android
RippleEffect Reuse
Best in #Android
Average in #Android
Top functions reviewed by kandi - BETA

kandi has reviewed RippleEffect and discovered the below as its top functions. This is intended to give you an instant insight into RippleEffect implemented functionality, and help decide if they suit your requirements.

  • Set the RippleView to be created .
  • Override paint method .
  • Initializes the ripple view
  • Creates the animation .
  • get view
  • Set the text value of the itemViewHolder on the viewHolder
  • Override this method to handle the action bar item selection .
  • This method is called when the row view is created .
  • Update the list of strings .
  • On createOptions menu .

RippleEffect Key Features

app:rv_alpha [integer def:90 0-255] -→ Alpha of the ripple

app:rv_framerate [integer def:10] -→ Frame rate of the ripple animation

app:rv_rippleDuration [integer def:400] -→ Duration of the ripple animation

app:rv_ripplePadding [dimension def:0] -→ Add a padding to the ripple

app:rv_color [color def:@android:color/white] -→ Color of the ripple

app:rv_centered [boolean def:false] -→ Center ripple in the child view

app:rv_type [enum (simpleRipple, doubleRipple) def:simpleRipple] -→ Simple or double ripple

app:rv_zoom [boolean def:false] -→ Enable zoom animation

app:rv_zoomDuration [integer def:150] -→ Duration of zoom animation

app:rv_zoomScale [float def:1.03] -→ Scale of zoom animation

default

copy iconCopydownload iconDownload
dependencies {
    compile 'com.github.traex.rippleeffect:library:1.3'
}

Storybook + Ionic React + styled-components CSS order issues

copy iconCopydownload iconDownload
const StyledIonInput = styled(IonInput)`
  && {
    font-weight: normal;
    line-height: 24px;
    height: 40px;
    border: 1px solid #d3d3d3;
    border-radius: 50px;
    --padding-start: 20px;
    --padding-left: 20px;
  }
`

Angular Cannot read property 'signup' of undefined post call using web API

copy iconCopydownload iconDownload
export class SignUpComponent implements OnInit {

 public fullnameVar;
 public phonenumberVar;
 public emailVar;
 public passwordVar;
 public coreConfig: any;
 public passwordTextType: boolean;
 // REMOVE ApiProvider FROM HERE

constructor(
   private api: ApiProvider
){
}

Dynamic multiple spinners "setOnItemSelectedListener()" is not working on item click - Android

copy iconCopydownload iconDownload
<?xml version="1.0" encoding="utf-8"?>

<resources>
    <string-array name="myarray">
      <item>Itemname1</item>
      <item>Itemname2</item>
      <item>Itemname3</item>
      <item>Itemname4</item>
      <item>Itemname5</item>
    </string-array>
</resources>

public class MainActivity extends AppCompatActivity {

    private static final String TAG ="" ;
    private ArrayAdapter<String> SpinnerAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        List<SpinnerItem> arrSpinnerItem;
        final List<AppCompatSpinner> arrSpinners = new ArrayList<>();
        ViewGroup layout_viewContainer = (ViewGroup) findViewById(R.id.addSale2Act_layout_viewContainer);


        for (int i = 0; i < 2; i++) {

            LinearLayout newView = (LinearLayout) getLayoutInflater().inflate(R.layout.view_linear_layout, null);
            newView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
            AppCompatSpinner spinner = newView.findViewById(R.id.view_spinner);

            SpinnerAdapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_spinner_item, getResources()
                    .getStringArray(R.array.myarray));

            SpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
            spinner.setAdapter(SpinnerAdapter);
            spinner.setTag(i);

            arrSpinners.add(spinner); //adding instance for the listener

            //inner loop to add items to the created spinner
            arrSpinnerItem = new ArrayList<>();
            for (int j = 0; j < 2; j++) {
                arrSpinnerItem.add(new SpinnerItem( "name"));
            }


           if (arrSpinnerItem.size() > 0)
            {
                try {
                    addSpinnerListener(spinner);
                }
                catch(Exception e)
                {
                    Toast.makeText(getApplicationContext(), ""+e, Toast.LENGTH_LONG ).show();
                }
            }
           //     spinner.setAdapter(new ArrayAdapter(this, android.R.layout.simple_spinner_item, arrSpinnerItem));

            layout_viewContainer.addView(newView);

        }


    }


    private void addSpinnerListener(final Spinner curspinner) {

        curspinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int position, long l) {

                ((TextView) adapterView.getChildAt(0)).setTextColor(Color.BLACK);
                String strselected = curspinner.getSelectedItem().toString();

                int spinnerPosition = SpinnerAdapter.getPosition(strselected);
                curspinner.setSelection(spinnerPosition);
               
            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {

            }
        });


    }
}
-----------------------
<?xml version="1.0" encoding="utf-8"?>

<resources>
    <string-array name="myarray">
      <item>Itemname1</item>
      <item>Itemname2</item>
      <item>Itemname3</item>
      <item>Itemname4</item>
      <item>Itemname5</item>
    </string-array>
</resources>

public class MainActivity extends AppCompatActivity {

    private static final String TAG ="" ;
    private ArrayAdapter<String> SpinnerAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        List<SpinnerItem> arrSpinnerItem;
        final List<AppCompatSpinner> arrSpinners = new ArrayList<>();
        ViewGroup layout_viewContainer = (ViewGroup) findViewById(R.id.addSale2Act_layout_viewContainer);


        for (int i = 0; i < 2; i++) {

            LinearLayout newView = (LinearLayout) getLayoutInflater().inflate(R.layout.view_linear_layout, null);
            newView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
            AppCompatSpinner spinner = newView.findViewById(R.id.view_spinner);

            SpinnerAdapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_spinner_item, getResources()
                    .getStringArray(R.array.myarray));

            SpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
            spinner.setAdapter(SpinnerAdapter);
            spinner.setTag(i);

            arrSpinners.add(spinner); //adding instance for the listener

            //inner loop to add items to the created spinner
            arrSpinnerItem = new ArrayList<>();
            for (int j = 0; j < 2; j++) {
                arrSpinnerItem.add(new SpinnerItem( "name"));
            }


           if (arrSpinnerItem.size() > 0)
            {
                try {
                    addSpinnerListener(spinner);
                }
                catch(Exception e)
                {
                    Toast.makeText(getApplicationContext(), ""+e, Toast.LENGTH_LONG ).show();
                }
            }
           //     spinner.setAdapter(new ArrayAdapter(this, android.R.layout.simple_spinner_item, arrSpinnerItem));

            layout_viewContainer.addView(newView);

        }


    }


    private void addSpinnerListener(final Spinner curspinner) {

        curspinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int position, long l) {

                ((TextView) adapterView.getChildAt(0)).setTextColor(Color.BLACK);
                String strselected = curspinner.getSelectedItem().toString();

                int spinnerPosition = SpinnerAdapter.getPosition(strselected);
                curspinner.setSelection(spinnerPosition);
               
            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {

            }
        });


    }
}

Using setTimeout inside React event, this synthetic event is reused for performance reasons

copy iconCopydownload iconDownload
setTimeout(() => {
    ripple.remove();
}, 500);
setTimeout(() => {
    e.target?.parentNode?.removeChild(ripple);
}, 500);
-----------------------
setTimeout(() => {
    ripple.remove();
}, 500);
setTimeout(() => {
    e.target?.parentNode?.removeChild(ripple);
}, 500);

Community Discussions

Trending Discussions on RippleEffect
  • Storybook + Ionic React + styled-components CSS order issues
  • Angular Cannot read property 'signup' of undefined post call using web API
  • Native Exception on a Pixel 2 XL
  • Dynamic multiple spinners &quot;setOnItemSelectedListener()&quot; is not working on item click - Android
  • Using setTimeout inside React event, this synthetic event is reused for performance reasons
Trending Discussions on RippleEffect

QUESTION

Storybook + Ionic React + styled-components CSS order issues

Asked 2021-Oct-26 at 23:28

I have custom components, which overrides Ionic's standard component look with the styled-components library. On the app page, this component looks ok. When I try to use it with Storybook it seems Ionic overrides my custom styles. After some discovery, I found that the order of style tags in the HTML header has changed. Firstly CSS from styled-components is included, then CSS from Ionic. Which caused the wrong order of style precedence.

The component:

import styled from 'styled-components'
import { IonInput } from '@ionic/react'
import { TextInputProps } from './TextInput.types'

const StyledIonInput = styled(IonInput)`
  font-weight: normal;
  line-height: 24px;
  height: 40px;
  border: 1px solid #d3d3d3;
  border-radius: 50px;
  --padding-start: 20px;
  --padding-left: 20px;
`

const TextInput = ({
  value,
  type = 'text',
  placeholder,
  onChange,
}: TextInputProps) => (
  <StyledIonInput
    value={value}
    type={type}
    onIonChange={onChange}
    placeholder={placeholder}
  />
)

export default TextInput

The story:

import { ComponentMeta, ComponentStory } from '@storybook/react'
import TextInput from './TextInput.component'

// eslint-disable-next-line import/no-default-export
export default {
  title: 'TextInput',
  component: TextInput,
} as ComponentMeta<typeof TextInput>

const Template: ComponentStory<typeof TextInput> = (args) => (
  <TextInput {...args} />
)

export const Default = Template.bind({})
Default.args = {
  placeholder: 'regular text-input',
}
Default.storyName = 'default'

export const Password = Template.bind({})
Password.args = {
  placeholder: 'password text',
  type: 'password',
}
Password.storyName = 'Password type'

preview.js with decorator configuration:

/* Core CSS required for Ionic components to work properly */
import '@ionic/react/css/core.css'

/* Basic CSS for apps built with Ionic */
import '@ionic/react/css/normalize.css'
import '@ionic/react/css/structure.css'
import '@ionic/react/css/typography.css'

/* Optional CSS utils that can be commented out */
import '@ionic/react/css/padding.css'
import '@ionic/react/css/float-elements.css'
import '@ionic/react/css/text-alignment.css'
import '@ionic/react/css/text-transformation.css'
import '@ionic/react/css/flex-utils.css'
import '@ionic/react/css/display.css'

import '../src/theme/variables.css'

import React, { useState } from 'react'

import { setupConfig } from '@ionic/react'
import { IonApp, IonContent, IonPage } from '@ionic/react'

/* Ionic framework configuration to enforce same look and feel across platforms */
setupConfig({
  rippleEffect: false,
  mode: 'ios',
})

const IonWrapper = ({ children }) => {
  return (
    <IonApp>
      <IonPage style={{ margin: '20px' }}>
        <IonContent>{children}</IonContent>
      </IonPage>
    </IonApp>
  )
}

export const decorators = [
  (Story) => (
    <IonWrapper>
      <Story />
    </IonWrapper>
  ),
]

export const parameters = {
  actions: { argTypesRegex: '^on[A-Z].*' },
  controls: {
    matchers: {
      // color: /(background|color)$/i,
      date: /Date$/,
    },
  },
}

Example of the wrong precedence of styles. Selected line is generated by styled-components. example of wrong generated styles

Any advice will be appreciated!

ANSWER

Answered 2021-Oct-26 at 23:28

styled-components priority rules did the trick:

const StyledIonInput = styled(IonInput)`
  && {
    font-weight: normal;
    line-height: 24px;
    height: 40px;
    border: 1px solid #d3d3d3;
    border-radius: 50px;
    --padding-start: 20px;
    --padding-left: 20px;
  }
`

Source https://stackoverflow.com/questions/69716227

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install RippleEffect

You can download it from GitHub, Maven.
You can use RippleEffect like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the RippleEffect component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.