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
#!/bin/sh | |
adb devices | tail -n +2 | cut -sf 1 | xargs -I \{\} -P4 adb -s \{\} install -r $1 |
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 abstract class BaseViewStubFragment extends Fragment { | |
private Bundle mSavedInstanceState; | |
private boolean mHasInflated = false; | |
private ViewStub mViewStub; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.fragment_viewstub, container, false); | |
mViewStub = (ViewStub) view.findViewById(R.id.fragmentViewStub); | |
mViewStub.setLayoutResource(getViewStubLayoutResource()); |
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"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ProgressBar | |
android:id="@+id/inflateProgressbar" | |
android:foregroundGravity="center" | |
android:layout_gravity="center" | |
android:indeterminate="true" | |
android:layout_width="48dp" |
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 View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.fragment_viewstub, container, false); | |
mViewStub = (ViewStub) view.findViewById(R.id.fragmentViewStub); | |
mViewStub.setLayoutResource(getViewStubLayoutResource()); | |
mSavedInstanceState = savedInstanceState; | |
if (getUserVisibleHint() && !mHasInflated) { | |
View inflatedView = mViewStub.inflate(); | |
onCreateViewAfterViewStubInflated(inflatedView, mSavedInstanceState); |
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
/** | |
* | |
* @param originalViewContainerWithViewStub | |
*/ | |
@CallSuper | |
protected void afterViewStubInflated(View originalViewContainerWithViewStub) { | |
mHasInflated = true; | |
if (originalViewContainerWithViewStub != null) { | |
View pb = originalViewContainerWithViewStub.findViewById(R.id.inflateProgressbar); | |
pb.setVisibility(View.GONE); |
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 setUserVisibleHint(boolean isVisibleToUser) { | |
super.setUserVisibleHint(isVisibleToUser); | |
if (isVisibleToUser && mViewStub != null && !mHasInflated) { | |
View inflatedView = mViewStub.inflate(); | |
onCreateViewAfterViewStubInflated(inflatedView, mSavedInstanceState); | |
afterViewStubInflated(getView()); | |
} | |
} |
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
private static View createPublisherAdView(Context context, String adId, final com.google.android.gms.ads.AdListener listener) { | |
try { | |
final PublisherAdView adView = new PublisherAdView(context); | |
adView.setAdUnitId(adId); | |
//adView.setAdSizes(AdSize.SMART_BANNER); | |
adView.setAdSizes(AdSize.BANNER); | |
// if (listener != null) { | |
adView.setAdListener(new AdListener() { | |
@Override |
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
package com.ninegag.android.app.ui.fragments; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v4.util.ArrayMap; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.LinearLayout; |
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
{ | |
"items": ["item 1", "item 2", "item 3"], | |
"next": "792f282e3150f66e32ab229d4c7fd01832ccbf84/page2" | |
} |
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
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title></title></head><body><script type="text/javascript">var additionalReports=window.additionalReports||{};additionalReports.ReportingManager=function(){this.brdUrl="https://www.hktvmall.com/hktv/zh/main/Kimberly-Clark-Family-Care-Store/s/H0551003/%E8%B6%85%E7%B4%9A%E5%B7%BF%E5%A0%B4/%E8%B6%85%E7%B4%9A%E5%B8%82%E5%A0%B4/%E7%B4%99%E5%93%81-%E5%8D%B3%E6%A3%84%E5%93%81-%E5%AE%B6%E5%B1%85%E7%94%A8%E5%93%81/%E6%BF%95%E7%B4%99%E5%B7%BE/%E6%BF%95%E5%BB%81%E7%B4%9940%E7%89%87%E8%A3%9C%E5%85%85%E8%A3%9D/p/H0888001_S_10050049?utm_source=merchant_kc&utm_medium=gdn_300x250&utm_campaign=andrex_mbt&utm_term=affinity&utm_content=general&autoTriggerApp=true",this.clickThroughUrls=[],this.networkUrl="",this.defaultClickUrl=[],this.clickVersionUrl=[],this.networkUrl.length>0&&(this.clickThroughUrls[this.clickThroughUrls.length]=this.networkUrl),this.clickVersionUrl.length>0&&(this.clickThroughUrls=this.clickThroughUrls.concat(this. |
OlderNewer