Skip to content

Instantly share code, notes, and snippets.

Harsh Dalwadi dalwadi2

  • Samcom Technologies
  • Ahmedabad
Block or report user

Report or block dalwadi2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dalwadi2
dalwadi2 / RatingBarColorChange.java
Created Sep 26, 2018
Ratingbar that can change colors on every rating.
View RatingBarColorChange.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBinding = getViewDataBinding();
sessionSummaryVM.setNavigator(this);
setSupportActionBar(mBinding.toolbar);
mBinding.contentSessionSummary.rating.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
@Override
View SystemUtil.java
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.text.DecimalFormat;
import java.util.Enumeration;
import java.util.List;
import java.util.Locale;
@dalwadi2
dalwadi2 / 1 search_bar.xml
Created Mar 10, 2017 — forked from nickbutcher/1 search_bar.xml
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
View 1 search_bar.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@dalwadi2
dalwadi2 / ClearTextView.java
Created Jan 31, 2017 — forked from togramago/ClearTextView.java
TextView with background and transparent (carved through background) text
View ClearTextView.java
package com.runup.myapplication2.app;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.drawable.BitmapDrawable;
@dalwadi2
dalwadi2 / gist:ef7ef1e6d67e9777437aca1904846b6e
Created Jan 18, 2017 — forked from pocmo/gist:bc95238e890a185003c4
Android M-Preview 1 - Permissions + Groups + Protection Level
View gist:ef7ef1e6d67e9777437aca1904846b6e
(android.permission-group.CONTACTS) android.permission.READ_CONTACTS dangerous
(android.permission-group.CONTACTS) android.permission.WRITE_CONTACTS dangerous
(android.permission-group.CONTACTS) android.permission.READ_PROFILE dangerous
(android.permission-group.CONTACTS) android.permission.WRITE_PROFILE dangerous
(android.permission-group.CALENDAR) android.permission.READ_CALENDAR dangerous
(android.permission-group.CALENDAR) android.permission.WRITE_CALENDAR dangerous
(android.permission-group.SMS) android.permission.SEND_SMS dangerous
(android.permission-group.SMS) android.permission.RECEIVE_SMS dangerous
(android.permission-group.SMS) android.permission.READ_SMS dangerous
(android.permission-group.SMS) android.permission.RECEIVE_WAP_PUSH dangerous
View ValidationUtils.java
package io.github.dalwadi2.vaidationutils;
import android.content.Context;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ValidationUtils {
private final Context mContext;
@dalwadi2
dalwadi2 / CustomTextView.java
Last active Jan 20, 2017
CustomTextView that have functionality to change TextViewDrawable size.
View CustomTextView.java
package com.samcomtechnologies.chumchatclient.utils;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.TextView;
@dalwadi2
dalwadi2 / MyCustomTextView.java
Last active Jan 20, 2017
Custom font textview
View MyCustomTextView.java
package in.vaksys.notificationtest;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;
/**
* Created by Harsh on 15-03-2016.
*/
You can’t perform that action at this time.