Skip to content

Instantly share code, notes, and snippets.

@abdallaadelessa
abdallaadelessa / .gitignore
Last active January 20, 2016 10:39
Updated .gitignore file for Android Studio
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
private static StaticLayout drawMultiLineEllipsizedText(Context context, final Canvas canvas, Rect bounds, float textSize, final String text, int fontColor, String fontName) {
StaticLayout sl = null;
if(text != null) {
TextPaint textPaint = new TextPaint();
textPaint.setTextSize(textSize);
textPaint.setColor(fontColor);
if(fontName != null)
textPaint.setTypeface(Typeface.createFromAsset(context.getAssets(), fontName));
sl = new StaticLayout(text, textPaint, bounds.width(), Layout.Alignment.ALIGN_CENTER, 1, 1, true);
sl.draw(canvas);
package com.afit.bank.ui.adapters;
import android.app.Activity;
import android.content.Context;
import android.graphics.PorterDuff;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Filter;
{
"survey": {
"formattedDate": "07 Dec 2016",
"HealthcarOperator": {
"HealthCareOperatorActivities": [],
"HealthcareOperatorId": "cd8bce3f-3be5-e511-80e3-000d3a239d3d",
"HealthcareOperatorName": "Hospital 1",
"HealthcareOperatorSegment": "Outpatient Clinic",
"HealthCareOperatorSpecialities": [],
"PrimaryContact": {
[System.Web.Http.HttpGet]
public HttpResponseMessage DownloadImage(Guid imageId)
{
var fileInfo = _imageServices.GetImageFile(imageId);
if (fileInfo != null)
{
HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
var stream = fileInfo.OpenRead();
result.Content = new StreamContent(stream);
{
"FileDC": {
"Content": [47, 57, 106, 47, 52, 65, 65, 81, 83, 107, 90, 74, 82, 103, 65, 66, 65, 81, 65, 65, 65, 81, 65, 66, 65, 65, 68, 47, 52, 81, 75, 71, 82, 88, 104, 112, 90, 103, 65, 65, 83, 85, 107, 113, 65, 65, 103, 65, 65, 65, 65, 67, 65, 68, 69, 66, 65, 103, 65, 72, 65, 65, 65, 65, 74, 103, 65, 65, 65, 71, 109, 72, 66, 65, 65, 66, 10, 65, 65, 65, 65, 76, 103, 65, 65, 65, 65, 65, 65, 65, 65, 66, 72, 98, 50, 57, 110, 98, 71, 85, 65, 65, 65, 73, 65, 65, 74, 65, 72, 65, 65, 81, 65, 65, 65, 65, 119, 77, 106, 73, 119, 104, 112, 73, 72, 65, 68, 69, 67, 65, 65, 66, 77, 65, 65, 65, 65, 65, 65, 65, 65, 65, 69, 70, 84, 81, 48, 108, 74, 65, 65, 65, 65, 10, 101, 121, 74, 109, 99, 109, 57, 116, 73, 106, 111, 105, 98, 51, 82, 111, 90, 88, 73, 105, 76, 67, 74, 49, 97, 87, 81, 105, 79, 105, 73, 52, 90, 106, 107, 121, 78, 106, 74, 108, 90, 105, 48, 51, 89, 87, 70, 108, 76, 84, 81, 122, 78, 87, 85, 116, 89, 106, 107, 122, 90, 105, 49, 108, 89, 106, 73, 51, 89, 87, 69, 49, 77, 71, 90, 108, 10, 77, 109, 69, 105, 76, 6
public class GetParticipantRequest {
String token;
int currentPage;
int pageSize;
String SortExpression;
String lang;
String SortDirection;
}
{
"d": {
"__type": "SearchCampaignResult:#MOEW.ESB.Core.Services.BusinessObjects",
"currentPage": 1,
"lstSearchCampaignObject": [{
"__type": "SearchCampaignObject:#MOEW.ESB.Core.Services.BusinessObjects",
"ArabicSubject": "تغيير النطاق والشعار",
"AttachmentsFileNames": null,
"AttachmentsGUIDs": null,
"CampaignId": 40,
{
"d": {
"__type": "SearchCampaignResult:#MOEW.ESB.Core.Services.BusinessObjects",
"currentPage": 2,
"lstSearchCampaignObject": [{
"__type": "SearchCampaignObject:#MOEW.ESB.Core.Services.BusinessObjects",
"ArabicSubject": "اختبار",
"AttachmentsFileNames": null,
"AttachmentsGUIDs": null,
"CampaignId": 25,