ffmpeg -i DSC_%03d.jpg out.mp4
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
| DisplayMetrics displayMetrics = new DisplayMetrics(); | |
| getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); | |
| int height = displayMetrics.heightPixels; | |
| int width = displayMetrics.widthPixels; |
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
| GridView myLayout = findViewById(R.id.myLayoutId); | |
| for (int i = 0; i < myLayout.getChildCount(); i++) { | |
| // Int our case the gridView contains videos | |
| VideoView v = (VideoView) myLayout.getChildAt(i); | |
| // Start the video | |
| v.start(); | |
| } |
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
| RelativeLayout rl = findViewById(R.id.spenViewLayout); | |
| ImageView duplicate = new ImageView(getApplicationContext()); | |
| duplicate.setImageDrawable(getDrawable(R.drawable.love)); | |
| RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(300, 300); | |
| params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE); | |
| rl.addView(duplicate, params); |
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"?> | |
| <android.support.v7.widget.GridLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:grid="http://schemas.android.com/apk/res-auto" | |
| android:id="@+id/choice_grid" | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:layout_centerHorizontal="true" | |
| android:padding="4dp" |
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
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Text.RegularExpressions; | |
| /* | |
| http://forum.unity3d.com/threads/adjustable-character-spacing-free-script.288277/ | |
| Unity 5.4 compatible version | |
| Produces an simple tracking/letter-spacing effect on UI Text components. | |
| Set the spacing parameter to adjust letter spacing. |
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
| transform.position = Vector3.Lerp(startPos, endPos, Time.deltaTime * speed); |
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 int GetFirstActiveindex(GameObject _parentObject) | |
| { | |
| for (int i = 0; i < _parentObject.transform.childCount; i++) | |
| { | |
| if (_parentObject.transform.GetChild(i).gameObject.activeSelf == true) return i; | |
| } | |
| return 0; | |
| } |
NewerOlder