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
StringBuffer outputx = null; | |
try { | |
Process processx = Runtime.getRuntime().exec("/data/data/com.example.ffmpegencode/ffmpeg -loop_input -i /sdcard/go.jpg -i /sdcard/gohoubi.m4a -shortest -acodec copy /sdcard/goood.mp4"); | |
BufferedReader in = new BufferedReader(new InputStreamReader(processx.getInputStream())); | |
String line = null; | |
while ((line = in.readLine()) != null) { | |
Log.d("", "line"); | |
} | |
Log.d("", "encoding..."); | |
processx.waitFor(); |
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 ListViewAdapter extends BaseAdapter { | |
private Activity activity; | |
private ArrayList<VideoObject> data; | |
private static LayoutInflater inflater = null; | |
public ImageLoader imageLoader; | |
Context cx; | |
public ListViewAdapter(Activity a, ArrayList<VideoObject> videoObjListParam) { | |
activity = a; | |
inflater = (LayoutInflater) activity | |
.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
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
try { | |
if (v == findViewById(R.id.emailbtn)) { | |
Intent emailIntent = new Intent(Intent.ACTION_SENDTO,Uri.fromParts("mailto", "@", null)); | |
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "TITLE"); | |
emailIntent.putExtra(Intent.EXTRA_TEXT, "TEXT"); | |
startActivity(Intent.createChooser(emailIntent, "Send email...")); | |
} else if (v == findViewById(R.id.smsbtn)) { | |
Uri uri = Uri.parse("smsto:"); | |
Intent it = new Intent(Intent.ACTION_SENDTO, uri); | |
it.putExtra("sms_body", "BODY"); |
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
int currentapiVersion = android.os.Build.VERSION.SDK_INT; | |
if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) { | |
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) getSystemService(CLIPBOARD_SERVICE); | |
ClipData clip = ClipData.newPlainText("label", shortUrl); | |
clipboard.setPrimaryClip(clip); | |
Toast toast = Toast.makeText(getApplicationContext(),"copied", Toast.LENGTH_LONG); | |
toast.setGravity(Gravity.CENTER, 0, 0); | |
toast.show(); | |
} else { | |
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) getSystemService(CLIPBOARD_SERVICE); |
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 BarsFragment extends Fragment { | |
int[] positionsArray = new int[4]; | |
VerticalSeekBar[] seekBarArray; | |
LinearLayout ll; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, | |
Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.barsfragment, container, false); | |
String myTag = getTag(); | |
((MainActivity) getActivity()).setFragmentTag(myTag); |
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
class ArcProgress extends View { | |
Context cx; | |
float width; | |
float height; | |
float center_x, center_y; | |
final RectF oval = new RectF(); | |
final RectF touchArea = new RectF(); | |
float sweep = 0; | |
float left, right; |
NewerOlder