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.sample.daterange; | |
import android.content.Context; | |
import android.support.v4.view.ViewPager; | |
import android.util.AttributeSet; | |
import android.view.View; | |
/** | |
* @author Bramengton | |
* @date on 07/10/2016. |
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
import android.text.SpannableStringBuilder; | |
import android.text.Spanned; | |
import android.text.TextPaint; | |
import android.text.method.LinkMovementMethod; | |
import android.text.style.ClickableSpan; | |
import android.view.View; | |
import android.widget.TextView; | |
import java.util.ArrayList; | |
import java.util.regex.Matcher; |
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
private class TimeLineLoader extends AsyncTask<Void, Void, List<Status>> { | |
private AdapterTweets adapter; | |
private SwipyRefreshLayoutDirection direction; | |
private SwipyRefreshLayout mSwipyRefreshLayout; | |
TimeLineLoader(final AdapterTweets adapter, SwipyRefreshLayout swipyRefreshLayout){ | |
this.adapter = adapter; | |
this.mSwipyRefreshLayout =swipyRefreshLayout; | |
this.direction = swipyRefreshLayout.getDirection(); | |
} | |
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.gabesechan.android.reusable.receivers; | |
import java.util.Date; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.telephony.TelephonyManager; | |
public abstract class PhonecallReceiver extends BroadcastReceiver { |
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 class MyActivity extends Activity{ | |
private void commandStart() { | |
if (!mServiceIsStarted) { | |
moveToStartedState(); | |
return; | |
} |
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.mphone.callerplus; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.os.Build; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.content.ContextCompat; | |
import com.mphone.callerplus.utils.UIUtil; |
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
Я сделал поворот в v3 со следующим кодом: | |
<canvas id="carcanvas" width="1" height="1"></canvas> | |
if (document.getElementById('carcanvas').getContext) { | |
var supportsCanvas = true; | |
} else { | |
var supportsCanvas = false; | |
} |
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
apply plugin: 'com.android.application' | |
@Nullable | |
def getProperties(String fileName) { | |
final Properties properties = new Properties() | |
def file = file(fileName) | |
if (file.exists()) { | |
file.withInputStream { stream -> properties.load(stream) } | |
} | |
return properties |
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 class SomeFragment extends Fragment { | |
MapView mapView; | |
GoogleMap map; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View v = inflater.inflate(R.layout.some_layout, container, false); | |
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
/* | |
* DES encrypting/decrypting for text data | |
*/ | |
import java.security.*; | |
import javax.crypto.*; | |
public class SimpleDESCryptoProvider { | |
OlderNewer