This file contains hidden or 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
function User() { | |
this.id=0; | |
this.name=""; | |
this.description=""; | |
this.newDescription=function (newDescriptionData) { | |
this.description=newDescriptionData; | |
}; |
This file contains hidden or 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
Uri.parse("file:///android_asset/myfile.mp3") |
This file contains hidden or 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
@Override | |
public void onSensorChanged( SensorEvent event ) | |
{ | |
if ( currentLocation != null ) | |
{ | |
// get accelerometer data | |
if ( event.sensor.getType() == Sensor.TYPE_ACCELEROMETER ) |
This file contains hidden or 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
// tests | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | |
exclude group: 'com.android.support', module: 'support-annotations' | |
}) | |
compile 'com.android.support:appcompat-v7:25.3.1' | |
testCompile 'junit:junit:4.12' | |
testCompile "org.mockito:mockito-core:1.10.19" |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item> | |
<shape android:shape="rectangle" > | |
<gradient | |
android:angle="360" | |
android:centerColor="#dcdcdc" | |
android:endColor="#e7e7e7" | |
android:gradientRadius="360" |
This file contains hidden or 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 class FirstRecylerAdapter extends RecyclerView.Adapter<FirstRecylerAdapter.MyViewHolder> { | |
private List<Integer> imageList; | |
public class MyViewHolder extends RecyclerView.ViewHolder { | |
public ImageView image; | |
public MyViewHolder(View view) { | |
super(view); | |
image = (ImageView) view.findViewById(R.id.image); |
This file contains hidden or 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 class MyListView extends ListView | |
{ | |
private android.view.ViewGroup.LayoutParams params; | |
private int oldCount = 0; | |
public MyListView(Context context, AttributeSet attrs) | |
{ | |
super(context, attrs); | |
} |
This file contains hidden or 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 class ExpandableListAdapter extends BaseExpandableListAdapter | |
{ | |
private Context _context; | |
private List<String> _listDataHeader; // header titles | |
// child data in format of header title, child title | |
private HashMap<String, List<String>> _listDataChild; | |
public ExpandableListAdapter(Context context, List<String> listDataHeader, | |
HashMap<String, List<String>> listChildData) { |
This file contains hidden or 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 class FlipViewAnimation{ | |
public static void flip( View firstView, View secondView, float duration) | |
{ | |
firstView.animate().rotationX(90).setDuration(duration).setListener(new AnimatorListenerAdapter() { | |
@Override | |
public void onAnimationEnd(Animator animation) { | |
firstView.setVisibility(View.GONE); | |
secondView.setRotationX(-90); |
This file contains hidden or 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
/* | |
* Copyright (C) 2010 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |