This file contains 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 Bitmap apply(Bitmap bitmap) { | |
Log.d("Renderscript", "calculating"); | |
//Allocation for passing the laplace mask to renderscript | |
Type.Builder maskType = new Type.Builder(renderScript, Element.I32(renderScript)); | |
maskType.setX(5); | |
maskType.setY(5); | |
Allocation maskAllocation = Allocation.createTyped(renderScript, maskType.create()); |
This file contains 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
Bitmap myBitmap = MediaStore.Images.Thumbnails.getThumbnail( | |
context.getContentResolver(), ContentUris.parseId(getImageContentUri(context, new File(imagePath))), | |
MediaStore.Images.Thumbnails.MINI_KIND, | |
(BitmapFactory.Options) null); |
This file contains 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_collection,container, false); | |
//get the active collection id | |
prefs = PreferenceManager.getDefaultSharedPreferences(super.getActivity()); | |
editor = prefs.edit(); |
This file contains 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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<!-- | |
<android.support.v4.view.ViewPager | |
android:id="@+id/viewpager" | |
android:layout_width="match_parent" |
This file contains 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.ap.wificam.ImageDetails; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; | |
import com.ap.wificam.R; |
This file contains 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.ap.wificam; | |
import android.app.ActionBar; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.RectF; | |
import android.graphics.drawable.Drawable; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.os.Handler; |
This file contains 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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ListView | |
android:id="@+id/listview" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@android:color/white" /> |
This file contains 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 rect | |
* @param orientation | |
* @return converted coordinates according to image orientation | |
*/ | |
private Rect convertCoordinates (Rect rect, int orientation){ | |
if (orientation == 1) { | |
return rect; |
This file contains 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 void onConnectionEstablished(){ | |
Log.d("ConnectionService", "Connection Established"); | |
//TODO call Handler in ServiceFacade | |
} | |
private void onConnectionLost(){ | |
Log.d("ConnectionService", "Connection Lost"); | |
} |
This file contains 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.ap.wificam.wifiservice; | |
import android.app.IntentService; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.net.wifi.WifiConfiguration; | |
import android.net.wifi.WifiInfo; | |
import android.net.wifi.WifiManager; | |
import android.net.wifi.ScanResult; |