Color theming – some words
(Found somewhere in gist) With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where…
(Found somewhere in gist) With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where…
//this example is for recyclerView but it can be used somewhere else recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { super.onScrollStateChanged(recyclerView, newState); } @Override public void onScrolled(RecyclerView…
ffmpeg -i VID_20160407_190210.mp4 -vf fps=1 -qscale:v 16 out%d.jpg
//part when you click on item and start camera imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Context context = v.getContext(); if (takePictureIntent.resolveActivity(context.getPackageManager()) !=…
RelativeLayout lContainerLayout = new RelativeLayout(this); lContainerLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT)); TextView textView = new TextView(this); textView.setText("List is empty!"); RelativeLayout.LayoutParams lButtonParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); lButtonParams.addRule(RelativeLayout.CENTER_IN_PARENT); textView.setLayoutParams(lButtonParams); lContainerLayout.addView(textView); addContentView(lContainerLayout, new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT)); listView.setEmptyView(lContainerLayout);
Found here: http://stackoverflow.com/a/4118917/619673 Saving (w/o exception handling code): FileOutputStream fos = context.openFileOutput(fileName, Context.MODE_PRIVATE); ObjectOutputStream os = new ObjectOutputStream(fos); os.writeObject(this); os.close(); fos.close(); Loading (w/o exception handling code): FileInputStream fis = context.openFileInput(fileName);…
All what we need is to make few steps: Add in our project this line to output in log current path to database Log.d(TAG, "onCreate db: " + context.getDatabasePath("mydatabase.db")); Create…
Here is a very good answer: Where an app is stored very much depends on several criteria: System apps / pre-installed-bloatware-apps are stored in /system/app with privileged apps in /system/priv-app…
Interesting solution found on stackoverflow. In terminal, in current folder we write: for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")
In short words, two commands: brew remove aspell brew install aspell --with-lang-pl And now, we have dictionary with pl :)