• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MaterialRippleLayout类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.balysv.materialripple.MaterialRippleLayout的典型用法代码示例。如果您正苦于以下问题:Java MaterialRippleLayout类的具体用法?Java MaterialRippleLayout怎么用?Java MaterialRippleLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MaterialRippleLayout类属于com.balysv.materialripple包,在下文中一共展示了MaterialRippleLayout类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
private void init() {
    labelView.clear();
    List<Tag> tags = mProvider.getItems();
    for (Tag tag : tags) {
        labelView.addLabel(tag.title);
        labelView.setLayoutTransition(null);
        int position = labelView.getLabelsCounter() - 1;
        Label label = labelView.getLabel(position);
        View view = LayoutInflater.from(labelView.getContext()).inflate(R.layout.item_site_tag, null);
        MaterialRippleLayout rippleLayout = (MaterialRippleLayout) view.findViewById(R.id.ripple_layout);
        LinearLayout child = (LinearLayout) label.getChildAt(0);
        child.setBackgroundResource(android.R.color.transparent);
        label.removeView(child);
        rippleLayout.addView(child);
        label.addView(view);
        rippleLayout.setOnClickListener(v -> {
            if (position >= 0 && mProvider != null) {
                tag.selected = !tag.selected;
                notifyItemChanged(position);
                if (mItemClickListener != null)
                    mItemClickListener.onItemClick(v, position);
            }
        });
    }
}
 
开发者ID:PureDark,项目名称:H-Viewer,代码行数:26,代码来源:SiteTagAdapter.java


示例2: onCreateViewHolder

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public FavoritesShowViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    //View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.shared_favorites_shows, null);
    //FavoritesShowViewHolder favoritesShowViewHolder = new FavoritesShowViewHolder(view);
    /* Ripple Effect Return */
    final LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext());
    return new FavoritesShowViewHolder(
            MaterialRippleLayout.on(inflater.inflate(R.layout.shared_favorites_shows, viewGroup, false))
                    .rippleOverlay(true)
                    .rippleAlpha(0.2f)
                    .rippleColor(Utils.getColor(mContext, R.color.myseriesPrimaryBackgroundColor))
                    .rippleHover(true)
                    .create(),
            mFavoritesFragment
    );
}
 
开发者ID:adleywd,项目名称:WhatsNextSeries,代码行数:17,代码来源:FavoritesRecyclerViewAdapter.java


示例3: getView

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
    View view;
    view=layoutInflater.inflate(R.layout.custom_list_single_item, null);
    MaterialRippleLayout ripple=(MaterialRippleLayout)view.findViewById(R.id.ripple);
    FontText libraryOwnerTxt=(FontText)view.findViewById(R.id.library_name_txt);
    FontText libraryDescTxt=(FontText)view.findViewById(R.id.library_desc_txt);
    libraryOwnerTxt.setText("\n"+libraryName[position]);
    libraryDescTxt.setText(libraryDesc[position] + "\n");
    ripple.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //Toast.makeText(context, libraryName[position], Toast.LENGTH_SHORT).show();
            Intent intent=new Intent(Intent.ACTION_VIEW);
            intent.setData(Uri.parse(libraryUrl[position]));
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intent);
        }
    });
    return view;
}
 
开发者ID:crazyhitty,项目名称:minx,代码行数:22,代码来源:LibraryListAdapter.java


示例4: getView

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
    View view;
    view=layoutInflater.inflate(R.layout.custom_list_single_item, null);
    MaterialRippleLayout ripple=(MaterialRippleLayout)view.findViewById(R.id.ripple);
    final FontText titleTxt=(FontText)view.findViewById(R.id.library_name_txt);
    FontText bodyTxt=(FontText)view.findViewById(R.id.library_desc_txt);
    titleTxt.setText("\n"+titleArrLst.get(position).trim());
    bodyTxt.setText(urlArrLst.get(position)+ "\n");
    ripple.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Toast.makeText(context, titleArrLst.get(position).trim(), Toast.LENGTH_SHORT).show();
            Intent intent=new Intent(context, SavedExtndActivity.class);
            intent.putExtra("saved_extnd_title", titleArrLst.get(position));
            intent.putExtra("saved_extnd_url", urlArrLst.get(position));
            intent.putExtra("saved_extnd_body", bodyArrLst.get(position));
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intent);
        }
    });
    return view;
}
 
开发者ID:crazyhitty,项目名称:minx,代码行数:24,代码来源:SavedListAdapter.java


示例5: onCreate

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.demo);

    // xml initialization
    findViewById(R.id.ripple_layout_1).setOnClickListener(this);
    findViewById(R.id.ripple_layout_1).setOnLongClickListener(this);

    // static initialization
    View view = findViewById(R.id.ripple_layout_2);
    MaterialRippleLayout.on(view)
        .rippleColor(Color.parseColor("#FF0000"))
        .rippleAlpha(0.2f)
        .rippleHover(true)
        .create();

    view.setOnLongClickListener(this);
    view.setOnClickListener(this);
}
 
开发者ID:KangYoungkil,项目名称:material-ripple-master,代码行数:21,代码来源:DemoActivity.java


示例6: onWindowFocusChanged

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    //scroll to the correct icon in the horizontal scroll view if we are opening an edit intent OR if the user has rotated the screen
    if (editIntentFlag || !rotateHasOccuredFlag) {
        String icons[] = getResources().getStringArray(R.array.icons_array_pro);
        int selected = Arrays.asList(icons).indexOf(iconName);
        MaterialRippleLayout rip = (MaterialRippleLayout) findViewById(getResources().getIdentifier("ripple_imageButton" + Integer.toString(selected + 1), "id", getPackageName()));
        rip.setRadius(1000);
        selectedRippleButtonId = rip.getId();
        int x = rip.getLeft();
        int y = rip.getTop();
        hsv.scrollTo(x, y);
        editIntentFlag = false;
    }
}
 
开发者ID:jt19056,项目名称:Notey,代码行数:17,代码来源:MainActivity.java


示例7: onCreateView

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
                         Bundle savedInstanceState) {
    final Utils utils = new Utils(getActivity());

    View rootView = inflater.inflate(R.layout.cards_fragment, container, false);
    RelativeLayout relativeLayout = (RelativeLayout) rootView.findViewById(R.id.vg_cover);

    // Set the width of cards according to width of screen
    RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams();
    layoutParams.width = (int) (utils.getScreenWidth() * .8f);
    relativeLayout.setOnClickListener(this);

    frontText = (TextView) rootView.findViewById(R.id.frontText);
    backText = (TextView) rootView.findViewById(R.id.backText);
    pronunciationBtn = (MaterialRippleLayout) rootView.findViewById(R.id.pronunciationBtn);
    pronunciationBtn.setEnabled(false);

    // Instantiate the various views of the card.
    updateCheckedStatus(cardModel);

    pronunciationBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            mp.start();
        }
    });

    return rootView;
}
 
开发者ID:riteshakya037,项目名称:Flashcards-Demo,代码行数:31,代码来源:ScreenSlidePageFragment.java


示例8: enableQuietHours

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * Enables or disables the ability to change the start and end time for the Quiet Hours functionality.
 * It also changes the color of the view
 */
private static void enableQuietHours(boolean boo, Activity ac) {
	final TextView quietHourStartView = (TextView) ac.findViewById(R.id.notifications_quiet_hours_start);
	final TextView quietHourEndView = (TextView) ac.findViewById(R.id.notifications_quiet_hours_end);
	final TextView quietHourStartTagView = (TextView) ac.findViewById(R.id.notifications_quiet_hours_start_tag);
	final TextView quietHourEndTagView = (TextView) ac.findViewById(R.id.notifications_quiet_hours_end_tag);
	final TextView notificationsDuringQuietHours = (TextView) ac.findViewById(R.id.notifications_show_in_quiet_hours);

	int color = getEnabledTextColor(ac);

	if(!boo)
		color = getDisabledTextColor(ac);

	quietHourStartView.setTextColor(color);
	quietHourEndView.setTextColor(color);
	quietHourStartTagView.setTextColor(color);
	quietHourEndTagView.setTextColor(color);
	notificationsDuringQuietHours.setTextColor(color);

	MaterialRippleLayout rippleStart = (MaterialRippleLayout) ac.findViewById(R.id.notifications_quiet_hours_start_ripple);
	rippleStart.setEnabled(boo);

	MaterialRippleLayout rippleEnd = (MaterialRippleLayout) ac.findViewById(R.id.notifications_quiet_hours_end_ripple);
	rippleEnd.setEnabled(boo);

	MaterialRippleLayout rippleShowNotificationsInQuietHours = (MaterialRippleLayout) ac.findViewById(R.id.notifications_show_in_quiet_hours_ripple);
	rippleShowNotificationsInQuietHours.setEnabled(boo);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:32,代码来源:SettingsNotificationsActivity.java


示例9: enableVibrate

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * Enables or disables the ability to change the vibrate function.
 * It also changes the color of the view
 */
private static void enableVibrate(boolean boo, Activity ac) {
	final TextView vibrateView = (TextView) ac.findViewById(R.id.notifications_vibrate);
	MaterialRippleLayout rippleVibrate = (MaterialRippleLayout) ac.findViewById(R.id.notifications_vibrate_ripple);

	int color = getEnabledTextColor(ac);

	if(!boo)
		color = getDisabledTextColor(ac);


	vibrateView.setTextColor(color);
	rippleVibrate.setEnabled(boo);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:18,代码来源:SettingsNotificationsActivity.java


示例10: enableScreenWake

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * Enables or disables the ability to change the screen wake function.
 * It also changes the color of the view
 */
private static void enableScreenWake(boolean boo, Activity ac) {
	final TextView screenWakeView = (TextView) ac.findViewById(R.id.notifications_screen_wake);
	MaterialRippleLayout rippleScreenWake = (MaterialRippleLayout) ac.findViewById(R.id.notifications_screen_wake_ripple);

	int color = getEnabledTextColor(ac);

	if(!boo)
		color = getDisabledTextColor(ac);

       screenWakeView.setTextColor(color);
	rippleScreenWake.setEnabled(boo);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:17,代码来源:SettingsNotificationsActivity.java


示例11: enableSoundPlay

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * Enables or disables the ability to change the play sound function.
 * It also changes the color of the view
 */
private static void enableSoundPlay(boolean boo, Activity ac) {
	final TextView soundPlayView = (TextView) ac.findViewById(R.id.notifications_sound);
	MaterialRippleLayout rippleSoundPlay = (MaterialRippleLayout) ac.findViewById(R.id.notifications_sound_ripple);

	int color = getEnabledTextColor(ac);

	if(!boo)
		color = getDisabledTextColor(ac);

       soundPlayView.setTextColor(color);
	rippleSoundPlay.setEnabled(boo);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:17,代码来源:SettingsNotificationsActivity.java


示例12: enableBlinkLED

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * Enables or disables the ability to change the blink LED function.
 * It also changes the color of the view
 */
private static void enableBlinkLED(boolean boo, Activity ac) {
	final CheckedTextView soundPlayView = (CheckedTextView) ac.findViewById(R.id.notifications_led);
	MaterialRippleLayout rippleSoundPlay = (MaterialRippleLayout) ac.findViewById(R.id.notifications_led_ripple);

	int color = getEnabledTextColor(ac);

	if(!boo)
		color = getDisabledTextColor(ac);

	soundPlayView.setTextColor(color);
	rippleSoundPlay.setEnabled(boo);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:17,代码来源:SettingsNotificationsActivity.java


示例13: enableQuietHoursCheck

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * Enables or disables the ability to change the quiet hours function.
 * It also changes the color of the view
 */
 private static void enableQuietHoursCheck(boolean boo, Activity ac) {
	final TextView quietHoursView = (TextView) ac.findViewById(R.id.notifications_quiet_hours);
	MaterialRippleLayout rippleSoundPlay = (MaterialRippleLayout) ac.findViewById(R.id.notifications_quiet_hours_ripple);

	int color = getEnabledTextColor(ac);

	if(!boo)
		color = getDisabledTextColor(ac);

	quietHoursView.setTextColor(color);
	rippleSoundPlay.setEnabled(boo);
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:17,代码来源:SettingsNotificationsActivity.java


示例14: ripple

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
public static void ripple(View view) {
    MaterialRippleLayout.on(view)
            .rippleColor(AppController.getAppContext().getResources().getColor(R.color.colorAccent))
            .rippleAlpha(0.2f)
            .rippleHover(true)
            .create();
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:8,代码来源:MaterialRippleHelper.java


示例15: ripple

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
public static void ripple(View view) {
    MaterialRippleLayout.on(view)
            .rippleColor(App.getAppContext().getResources().getColor(R.color.theme_red))
            .rippleAlpha(0.2f)
            .rippleHover(true)
            .create();
}
 
开发者ID:xujiaji,项目名称:HaiNaBaiChuan,代码行数:8,代码来源:MaterialRippleHelper.java


示例16: notifyItemChanged

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
public void notifyItemChanged(int position) {
    Tag tag = mProvider.getItem(position);
    Label label = labelView.getLabel(position);
    label.setText(tag.title);
    MaterialRippleLayout rippleLayout = (MaterialRippleLayout) label.findViewById(R.id.ripple_layout);
    if (tag.selected) {
        rippleLayout.setRippleBackground(label.getContext().getResources().getColor(R.color.colorPrimary));
        rippleLayout.setRippleColor(label.getContext().getResources().getColor(R.color.dimgray));
    } else {
        rippleLayout.setRippleBackground(label.getContext().getResources().getColor(R.color.dimgray));
        rippleLayout.setRippleColor(label.getContext().getResources().getColor(R.color.colorPrimary));
    }
    rippleLayout.setRadius(0);
}
 
开发者ID:PureDark,项目名称:H-Viewer,代码行数:15,代码来源:SiteTagAdapter.java


示例17: onCreateViewHolder

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public SearchShowViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    final LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext());
    return new SearchShowViewHolder(
            MaterialRippleLayout.on(inflater.inflate(R.layout.shared_search_tvshow, viewGroup, false))
                    .rippleOverlay(true)
                    .rippleAlpha(0.2f)
                    .rippleColor(Utils.getColor(mContext, R.color.myseriesPrimaryBackgroundColor))
                    .rippleHover(true)
                    .create()
    );
}
 
开发者ID:adleywd,项目名称:WhatsNextSeries,代码行数:13,代码来源:SearchShowRecyclerViewAdapter.java


示例18: onCreateViewHolder

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public AiringTodayViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    final LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext());
    return new AiringTodayViewHolder(
            MaterialRippleLayout.on(inflater.inflate(R.layout.shared_airing_today_list, viewGroup, false))
                    .rippleOverlay(true)
                    .rippleAlpha(0.2f)
                    .rippleColor(Utils.getColor(mContext, R.color.myseriesPrimaryBackgroundColor))
                    .rippleHover(true)
                    .create()
    );
}
 
开发者ID:adleywd,项目名称:WhatsNextSeries,代码行数:13,代码来源:AiringTodayRecyclerViewAdapter.java


示例19: onCreateViewHolder

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
@Override
public PopularShowsViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    final LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext());
    return new PopularShowsViewHolder(
            MaterialRippleLayout.on(inflater.inflate(R.layout.shared_popular_show_list, viewGroup, false))
                    .rippleOverlay(true)
                    .rippleAlpha(0.2f)
                    .rippleColor(Utils.getColor(mContext, R.color.myseriesPrimaryBackgroundColor))
                    .rippleHover(true)
                    .create()
    );
}
 
开发者ID:adleywd,项目名称:WhatsNextSeries,代码行数:13,代码来源:PopularShowsRecyclerViewAdapter.java


示例20: radioClick

import com.balysv.materialripple.MaterialRippleLayout; //导入依赖的package包/类
/**
 * 点击事件
 */
public void radioClick(View v) {
    for (int i = 0; i < radioGroup.getChildCount(); i++) {
        RadioButton radioButton = ((MaterialRippleLayout) radioGroup.getChildAt(i)).getChildView();
        if (radioButton == v) {
            ((RadioButton) v).setChecked(true);
            spec = String.valueOf(i);
            requestData();
        } else {
            radioButton.setChecked(false);
        }
    }
}
 
开发者ID:maxwell-nc,项目名称:ExhibitionCenter,代码行数:16,代码来源:SelectAreaActivity.java



注:本文中的com.balysv.materialripple.MaterialRippleLayout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java InternalSettingsPreparer类代码示例发布时间:2022-05-21
下一篇:
Java TrainingParameters类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap