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 VideoFrameExtractor(Context context, String path, TextureView textureView) { | |
| mVideoPath = path; | |
| mTextureView = textureView; | |
| textureView.setSurfaceTextureListener(this); | |
| textureView.setTranslationX(-1920); | |
| if (textureView.isAvailable()) { | |
| initPlayer(textureView.getSurfaceTexture()); | |
| } |
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
| System.getProperty("line.separator"); |
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 getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { | |
| View v = super.getGroupView(groupPosition, isExpanded, convertView, parent); | |
| ExpandableListView mExpandableListView = (ExpandableListView) parent; | |
| mExpandableListView.expandGroup(groupPosition); | |
| return v; | |
| } |
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
| /** | |
| * Asyn-post to get duration of video. | |
| * | |
| * @param _context | |
| * {@link android.content.Context}. | |
| * @param _urlToVideo | |
| * The url to video in {@link java.lang.String}. | |
| * | |
| * @return {@link java.lang.String}. The Duration of video in long format like {@code 03:45}. | |
| * <p/> |
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 OneDirectionScrollView extends ScrollView { | |
| private GestureDetector mGestureDetector; | |
| private boolean mAllowTouch = true; | |
| public OneDirectionScrollView(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| if (!isInEditMode()) | |
| mGestureDetector = new GestureDetector(context, new YScrollDetector()); | |
| } |
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
| <LinearLayout | |
| android:layout_width="0dp" | |
| android:focusable="true" | |
| android:focusableInTouchMode="true" | |
| android:layout_height="0dp"> | |
| <requestFocus /> | |
| </LinearLayout> | |
| <!--Just a random EditText.--> | |
| <EditText |
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
| /* Get ActionBar's height. */ | |
| int[] abSzAttr; | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { | |
| abSzAttr = new int[]{android.R.attr.actionBarSize}; | |
| } else { | |
| abSzAttr = new int[]{R.attr.actionBarSize}; | |
| } | |
| TypedArray a = obtainStyledAttributes(abSzAttr); | |
| mActionBarHeight = a.getDimensionPixelSize(0, -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
| //Inspired by http://stackoverflow.com/a/20647011/1835650 | |
| //Inspired by http://aichixihongshi.iteye.com/blog/1207503 | |
| SpannableStringBuilder spanBuilder = (SpannableStringBuilder) p.getSpannedText(); //Html.from(.....) | |
| URLSpan[] spans = spanBuilder.getSpans(0, spanBuilder.length(), URLSpan.class); | |
| for (URLSpan s: spans) { | |
| int start = spanBuilder.getSpanStart(s); | |
| int end = spanBuilder.getSpanEnd(s); | |
| spanBuilder.removeSpan(s); | |
| CustomClickableSpan sp = new CustomClickableSpan(s, false); |
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
| /* | |
| * WebServer.c | |
| * | |
| * Created on: Nov 3, 2012 | |
| * Author: pavithra | |
| * | |
| * A web server in C language using only the standard libraries. | |
| * The port number is passed as an argument. | |
| * | |
| */ |
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 2011 The Go Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package resize | |
| import ( | |
| "image" | |
| "image/ycbcr" | |
| ) |