This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Rating bar drawable --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:id="@android:id/background" | |
android:drawable="@drawable/apptheme_rate_star_small_off_holo_light" /> | |
<item android:id="@android:id/secondaryProgress" | |
android:drawable="@drawable/apptheme_rate_star_small_half_holo_light" /> | |
<item android:id="@android:id/progress" | |
android:drawable="@drawable/apptheme_rate_star_small_on_holo_light" /> | |
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.cooltechworks.chartexample.PieChart | |
android:layout_marginTop="@dimen/margin_medium" | |
android:id="@+id/pie_chart" | |
android:layout_width="150dp" | |
android:layout_height="150dp" | |
android:layout_gravity="center" | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final PieChart pie = (PieChart) this.findViewById(R.id.pie_chart); | |
float[] marks = {0.35f, 0.3f, 0.2f,0.15f}; | |
String[] subjects = { "Physics", "Maths", "Chemistry", "CS"}; | |
int[] colors = {Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW}; | |
for (int i = 0; i < marks.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getFormattedPrice(Resources resources) { | |
final String LAKH = "L"; | |
final String CRORE = "C"; | |
double value = getPrice(); | |
String rupees = resources.getString(R.string.rupee); | |
if (value >= 100) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getFormattedPrice(Resources resources) { | |
final String LAKH = "L"; | |
final String CRORE = "C"; | |
double value = getPrice(); | |
String rupees = resources.getString(R.string.rupee); | |
if (value >= 100) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_margin="20dp" | |
android:background="@color/blue_bg" | |
android:orientation="vertical"> | |
<TextView | |
android:id="@+id/output_color_code" | |
android:layout_width="match_parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cooltechworks.materialcolorshades; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import android.text.Editable; | |
import android.text.TextWatcher; | |
import android.widget.EditText; | |
import android.widget.SeekBar; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<View | |
android:id="@+id/hello" | |
android:layout_width="150dp" | |
android:layout_height="150dp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cooltechworks.ondownsample; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cooltechworks.ondownsample; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.View; | |
/** | |
* Created by sharish on 7/24/15. | |
*/ | |
public abstract class OnDownListener implements View.OnTouchListener { |