Large diffs are not rendered by default.

@@ -20,8 +20,6 @@

package com.ushahidi.android.app.ui.tablet;

import java.util.Vector;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
@@ -36,15 +34,12 @@
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.ListView;

import com.ushahidi.android.app.R;
import com.ushahidi.android.app.adapters.BaseArrayAdapter;
import com.ushahidi.android.app.adapters.CategorySpinnerAdater;
import com.ushahidi.android.app.adapters.ListReportAdapter;
import com.ushahidi.android.app.entities.Category;
import com.ushahidi.android.app.fragments.BaseListFragment;
import com.ushahidi.android.app.models.ListReportModel;
import com.ushahidi.android.app.net.CategoriesHttpClient;
@@ -104,6 +99,7 @@ public void onActivityCreated(Bundle savedInstanceState) {
mListReportView = new ListReportView(getActivity());
mListReportAdapter = new ListReportAdapter(getActivity());
mHandler = new Handler();

mListReportView.getFilterReportView().addTextChangedListener(
new TextWatcher() {

@@ -147,7 +143,11 @@ public void onSaveInstanceState(Bundle outState) {
@Override
public void onResume() {
super.onResume();
mHandler.post(fetchReportList);
if(filterCategory == 0 ) {
mHandler.post(fetchReportList);
}else{
mHandler.post(fetchReportListByCategory);
}
}

@Override
@@ -213,6 +213,22 @@ public void run() {
}
}
};

/**
* refresh by category id
*/
final Runnable fetchReportListByCategory = new Runnable() {
public void run() {
try {
mListReportAdapter.refresh(filterCategory);
mListReportView.getPullToRefreshListView()
.setAdapter(mListReportAdapter);
mListReportView.displayEmptyListText();
}catch(Exception e) {
return;
}
}
};

/**
* Filter the list view with new items
@@ -244,30 +260,22 @@ private void showDropDownNav() {
@Override
public void onClick(DialogInterface dialog,
int which) {
if (spinnerArrayAdapter.listCategories != null) {
filterCategory = spinnerArrayAdapter.listCategories
.get(which).getDbId();
final String all = spinnerArrayAdapter.listCategories
.get(which).getCategoryTitle();
if ((all != null)
&& (!TextUtils.isEmpty(all))
&& (all != getActivity().getString(
R.string.all_categories))) {
mListReportAdapter
.refresh(filterCategory);
mListReportView
.getPullToRefreshListView()
.setAdapter(mListReportAdapter);
mListReportView.displayEmptyListText();

} else {
mListReportAdapter.refresh();
mListReportView
.getPullToRefreshListView()
.setAdapter(mListReportAdapter);
mListReportView.displayEmptyListText();
}

filterCategory = spinnerArrayAdapter.getTag(
which).getDbId();
final String all = spinnerArrayAdapter.getTag(
which).getCategoryTitle();

if ((all != null)
&& (!TextUtils.isEmpty(all))
&& (all != getActivity().getString(
R.string.all_categories))) {
mHandler.post(fetchReportListByCategory);

} else {
mHandler.post(fetchReportList);
}

dialog.dismiss();
}
}).create().show();
@@ -409,10 +417,10 @@ protected void onLoaded(boolean success) {
public void launchViewReport(int id) {
Intent i = new Intent(getActivity(), ViewReportActivity.class);
i.putExtra("id", id);
if (filterCategory == 0) {
if (filterCategory > 0) {
i.putExtra("category", filterCategory);
} else {
i.putExtra("category", "");
i.putExtra("category", 0);
}
startActivityForResult(i, 0);
getActivity().overridePendingTransition(R.anim.home_enter,
@@ -1,4 +1,3 @@

package com.ushahidi.android.app.ui.tablet;

import android.content.Intent;
@@ -15,64 +14,58 @@

public class ReportTabFragment extends LocalActivityManagerFragment {

private TabHost mTabHost;

private static final String TAG_LIST_REPORT = "list";

private static final String TAG_MAP_REPORT = "map";
private TabHost mTabHost;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.tabs_report, container, false);
mTabHost = (TabHost)view.findViewById(android.R.id.tabhost);
private static final String TAG_LIST_REPORT = "list";

mTabHost.setup(getLocalActivityManager());
private static final String TAG_MAP_REPORT = "map";

listListTab();
listMapTab();
return view;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.tabs_report, container, false);
mTabHost = (TabHost) view.findViewById(android.R.id.tabhost);

private void listListTab() {
if (mTabHost != null) {
addTab(TAG_LIST_REPORT, R.drawable.menu_list, ListReportActivity.class);
mTabHost.setup(getLocalActivityManager());

}
}
listListTab();
listMapTab();
return view;
}

private void listMapTab() {
if (mTabHost != null) {
addTab(TAG_MAP_REPORT, R.drawable.menu_map, ReportMapActivity.class);
private void listListTab() {
if (mTabHost != null) {
addTab(TAG_LIST_REPORT, R.drawable.menu_list,
ListReportActivity.class);

}
}
}
}

private void listAdminTab() {
if (mTabHost != null) {
addTab(TAG_MAP_REPORT, R.drawable.menu_map, ReportMapActivity.class);
private void listMapTab() {
if (mTabHost != null) {
addTab(TAG_MAP_REPORT, R.drawable.menu_map, ReportMapActivity.class);

}
}
}
}

private void addTab(String indicator, int drawableId, Class<?> c) {
TabHost tabHost = mTabHost;
TabHost.TabSpec spec = tabHost.newTabSpec(indicator);
Intent intent = new Intent(getActivity(), c);
View tabIndicator = LayoutInflater.from(getActivity()).inflate(R.layout.tab_indicator,
tabHost.getTabWidget(), false);
ImageView icon = (ImageView)tabIndicator.findViewById(R.id.icon);
icon.setImageResource(drawableId);
private void addTab(String indicator, int drawableId, Class<?> c) {
TabHost tabHost = mTabHost;
TabHost.TabSpec spec = tabHost.newTabSpec(indicator);
Intent intent = new Intent(getActivity(), c);
View tabIndicator = LayoutInflater.from(getActivity()).inflate(
R.layout.tab_indicator, tabHost.getTabWidget(), false);
ImageView icon = (ImageView) tabIndicator.findViewById(R.id.icon);
icon.setImageResource(drawableId);

spec.setIndicator(tabIndicator);
spec.setContent(intent);
tabHost.addTab(spec);
}
spec.setIndicator(tabIndicator);
spec.setContent(intent);
tabHost.addTab(spec);
}


static ReportTabFragment newInstance() {
ReportTabFragment f = new ReportTabFragment();
static ReportTabFragment newInstance() {
ReportTabFragment f = new ReportTabFragment();

return f;
}
return f;
}

}

Large diffs are not rendered by default.

@@ -47,6 +47,8 @@
import android.os.Environment;
import android.provider.Settings;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
import android.widget.Toast;

import com.ushahidi.android.app.net.MainGeocoder;
@@ -439,4 +441,11 @@ public static boolean isTablet(Context context) {
public static boolean isHoneycombTablet(Context context) {
return isHoneycomb() && isTablet(context);
}

public static int getScreenWidth(Context context) {
WindowManager wm = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
return display.getWidth();
}
}
@@ -1,98 +1,90 @@

package com.ushahidi.android.app.views;

import com.ushahidi.android.app.R;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

public class AboutView extends com.ushahidi.android.app.views.View {
import com.ushahidi.android.app.R;

private ImageButton searchButton;
public class AboutView extends com.ushahidi.android.app.views.View {

private TextView version;
private TextView version;

public AboutView(FragmentActivity activity) {
super(activity);
// VERSION
version = (TextView)activity.findViewById(R.id.version);
try {
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("v");
sBuilder.append(activity.getPackageManager().getPackageInfo(activity.getPackageName(),
0).versionName);
version.setText(sBuilder.toString());
} catch (NameNotFoundException e) {
Log.e("About", "NameNotFoundException", e);
version.setText("");
}
public AboutView(FragmentActivity activity) {
super(activity);
// VERSION
version = (TextView) activity.findViewById(R.id.version);
try {
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("v");
sBuilder.append(activity.getPackageManager().getPackageInfo(
activity.getPackageName(), 0).versionName);
version.setText(sBuilder.toString());
} catch (NameNotFoundException e) {
Log.e("About", "NameNotFoundException", e);
version.setText("");
}

// BUTTONS
setButtonVisibility((Button)activity.findViewById(R.id.media_link),
activity.getString(R.string.media_url), activity);
setButtonVisibility((Button)activity.findViewById(R.id.team_link),
activity.getString(R.string.team_url), activity);
setButtonVisibility((Button)activity.findViewById(R.id.twitter_link),
activity.getString(R.string.twitter_url), activity);
setButtonVisibility((Button)activity.findViewById(R.id.facebook_link),
activity.getString(R.string.facebook_url), activity);
setButtonVisibility((Button)activity.findViewById(R.id.contact_link),
activity.getString(R.string.contact_url), activity);
}
// BUTTONS
setButtonVisibility((Button) activity.findViewById(R.id.media_link),
activity.getString(R.string.media_url), activity);
setButtonVisibility((Button) activity.findViewById(R.id.team_link),
activity.getString(R.string.team_url), activity);
setButtonVisibility((Button) activity.findViewById(R.id.twitter_link),
activity.getString(R.string.twitter_url), activity);
setButtonVisibility((Button) activity.findViewById(R.id.facebook_link),
activity.getString(R.string.facebook_url), activity);
setButtonVisibility((Button) activity.findViewById(R.id.contact_link),
activity.getString(R.string.contact_url), activity);
}

public AboutView(ViewGroup viewGroup, Context context) {
super(viewGroup);
// TODO Auto-generated constructor stub
searchButton = (ImageButton)viewGroup.findViewById(R.id.search_report_btn);
public AboutView(ViewGroup viewGroup, Context context) {
super(viewGroup);

if (!TextUtils.isEmpty(context.getString(R.string.deployment_url))) {
searchButton.setVisibility(View.GONE);
} else {
searchButton.setVisibility(View.VISIBLE);
}
// VERSION
version = (TextView)viewGroup.findViewById(R.id.version);
try {
version.setText(context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName);
} catch (NameNotFoundException e) {
Log.e("About", "NameNotFoundException", e);
version.setText("");
}
// VERSION
version = (TextView) viewGroup.findViewById(R.id.version);
try {
version.setText(context.getPackageManager().getPackageInfo(
context.getPackageName(), 0).versionName);
} catch (NameNotFoundException e) {
Log.e("About", "NameNotFoundException", e);
version.setText("");
}

// BUTTONS
setButtonVisibility((Button)viewGroup.findViewById(R.id.media_link),
context.getString(R.string.media_url), context);
setButtonVisibility((Button)viewGroup.findViewById(R.id.team_link),
context.getString(R.string.team_url), context);
setButtonVisibility((Button)viewGroup.findViewById(R.id.twitter_link),
context.getString(R.string.twitter_url), context);
setButtonVisibility((Button)viewGroup.findViewById(R.id.facebook_link),
context.getString(R.string.facebook_url), context);
setButtonVisibility((Button)viewGroup.findViewById(R.id.contact_link),
context.getString(R.string.contact_url), context);
}
// BUTTONS
setButtonVisibility((Button) viewGroup.findViewById(R.id.media_link),
context.getString(R.string.media_url), context);
setButtonVisibility((Button) viewGroup.findViewById(R.id.team_link),
context.getString(R.string.team_url), context);
setButtonVisibility((Button) viewGroup.findViewById(R.id.twitter_link),
context.getString(R.string.twitter_url), context);
setButtonVisibility(
(Button) viewGroup.findViewById(R.id.facebook_link),
context.getString(R.string.facebook_url), context);
setButtonVisibility((Button) viewGroup.findViewById(R.id.contact_link),
context.getString(R.string.contact_url), context);
}

private void setButtonVisibility(final Button button, final String url, final Context context) {
if (!TextUtils.isEmpty(url)) {
button.setVisibility(View.VISIBLE);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
context.startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri
.parse(url)));
}
});
} else {
button.setVisibility(View.GONE);
}
}
private void setButtonVisibility(final Button button, final String url,
final Context context) {
if (!TextUtils.isEmpty(url)) {
button.setVisibility(View.VISIBLE);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
context.startActivity(new Intent(
android.content.Intent.ACTION_VIEW, Uri.parse(url)));
}
});
} else {
button.setVisibility(View.GONE);
}
}
}
@@ -13,8 +13,6 @@

import com.google.android.maps.OverlayItem;
import com.ushahidi.android.app.R;
import com.ushahidi.android.app.R.id;
import com.ushahidi.android.app.R.layout;

public class BalloonOverlayView<Item extends OverlayItem> extends FrameLayout {

@@ -20,7 +20,6 @@

package com.ushahidi.android.app.views;

import android.R;
import android.app.Activity;
import android.view.View;
import android.widget.ArrayAdapter;
@@ -0,0 +1,134 @@
/**
** Copyright (c) 2010 Ushahidi Inc
** All rights reserved
** Contact: team@ushahidi.com
** Website: http://www.ushahidi.com
**
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: http://www.gnu.org/licenses/lgpl.html.
**
**
** If you have questions regarding the use of this file, please contact
** Ushahidi developers at team@ushahidi.com.
**
**/
package com.ushahidi.android.app.views;

import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.Toast;
import android.widget.ViewAnimator;

import com.ushahidi.android.app.R;

/**
* @author eyedol
*
*/
public class ReportNewsView extends View {

public ViewAnimator viewAnimator;

public WebView webView;

public Context context;

private ProgressBar loadingSpinner;

public String url;

private static boolean CLEAR_CACHE_ON_LOAD = false;

/**
* @param activity
*/
public ReportNewsView(FragmentActivity activity) {
super(activity);
this.context = activity;
viewAnimator = (ViewAnimator) activity
.findViewById(R.id.news_View_animator);
webView = (WebView) activity.findViewById(R.id.news_webview);
loadingSpinner = (ProgressBar) activity
.findViewById(R.id.news_loading_spinner);
}

public void goNext(String url) {
Animation out = AnimationUtils.loadAnimation(context,
android.R.anim.slide_out_right);
Animation in = AnimationUtils.loadAnimation(context,
android.R.anim.slide_in_left);
viewAnimator.setInAnimation(in);
viewAnimator.setOutAnimation(out);
this.url = url;
setWebView();
}

public void goPrevious(String url) {
Animation out = AnimationUtils.loadAnimation(context, R.anim.fade_in);
Animation in = AnimationUtils.loadAnimation(context, R.anim.fade_out);
viewAnimator.setInAnimation(in);
viewAnimator.setOutAnimation(out);
this.url = url;
setWebView();
}

public void setWebView() {
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setPluginsEnabled(true);
settings.setLightTouchEnabled(true);
webView.setWebViewClient(webClient);
webView.post(new Runnable() {
public void run() {
if (CLEAR_CACHE_ON_LOAD) {
webView.clearCache(true);
}
webView.loadUrl(url);
}
});

}

private WebViewClient webClient = new WebViewClient() {

@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
loadingSpinner.setVisibility(android.view.View.VISIBLE);
webView.setVisibility(android.view.View.INVISIBLE);
}

@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
loadingSpinner.setVisibility(android.view.View.GONE);
webView.setVisibility(android.view.View.VISIBLE);
}

@Override
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {

// TODO move this the appropriate method
Log.e(ReportVideoView.class.getSimpleName(), "Error " + errorCode
+ ": " + description);
Toast.makeText(view.getContext(),
"Error " + errorCode + ": " + description,
Toast.LENGTH_LONG).show();
super.onReceivedError(view, errorCode, description, failingUrl);
}
};
}
@@ -0,0 +1,78 @@
/**
** Copyright (c) 2010 Ushahidi Inc
** All rights reserved
** Contact: team@ushahidi.com
** Website: http://www.ushahidi.com
**
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: http://www.gnu.org/licenses/lgpl.html.
**
**
** If you have questions regarding the use of this file, please contact
** Ushahidi developers at team@ushahidi.com.
**
**/
package com.ushahidi.android.app.views;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v4.app.FragmentActivity;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageSwitcher;
import android.widget.ImageView;

import com.ushahidi.android.app.R;

/**
* @author eyedol
*
*/
public class ReportPhotoView extends View {

public ImageSwitcher imageSwitcher;

public Context context;

public ReportPhotoView(FragmentActivity activity) {
super(activity);
this.context = activity;
imageSwitcher = (ImageSwitcher) activity
.findViewById(R.id.imageSwitcher);
}

public void goNext(Drawable drawable) {
Animation out = AnimationUtils.loadAnimation(context,
android.R.anim.slide_out_right);
Animation in = AnimationUtils.loadAnimation(context,
android.R.anim.slide_in_left);
imageSwitcher.setInAnimation(in);
imageSwitcher.setOutAnimation(out);
imageSwitcher.setImageDrawable(drawable);
}

public void goPrevious(Drawable drawable) {
Animation out = AnimationUtils.loadAnimation(context,
R.anim.slide_left_out);
Animation in = AnimationUtils.loadAnimation(context,
R.anim.slide_right_in);
imageSwitcher.setInAnimation(in);
imageSwitcher.setOutAnimation(out);
imageSwitcher.setImageDrawable(drawable);
}

public ImageView imageView() {
ImageView i = new ImageView(context);
i.setScaleType(ImageView.ScaleType.FIT_CENTER);
i.setLayoutParams(new ImageSwitcher.LayoutParams(
android.view.ViewGroup.LayoutParams.MATCH_PARENT,
android.view.ViewGroup.LayoutParams.MATCH_PARENT));
return i;
}

}
@@ -0,0 +1,134 @@
/**
** Copyright (c) 2010 Ushahidi Inc
** All rights reserved
** Contact: team@ushahidi.com
** Website: http://www.ushahidi.com
**
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: http://www.gnu.org/licenses/lgpl.html.
**
**
** If you have questions regarding the use of this file, please contact
** Ushahidi developers at team@ushahidi.com.
**
**/
package com.ushahidi.android.app.views;

import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.Toast;
import android.widget.ViewAnimator;

import com.ushahidi.android.app.R;

/**
* @author eyedol
*
*/
public class ReportVideoView extends View {

public ViewAnimator viewAnimator;

public WebView webView;

public Context context;

private ProgressBar loadingSpinner;

public String url;

private static boolean CLEAR_CACHE_ON_LOAD = false;

/**
* @param activity
*/
public ReportVideoView(FragmentActivity activity) {
super(activity);
this.context = activity;
viewAnimator = (ViewAnimator) activity
.findViewById(R.id.videoViewAnimator);
webView = (WebView) activity.findViewById(R.id.videoWebView);
loadingSpinner = (ProgressBar) activity
.findViewById(R.id.loading_spinner);
}

public void goNext(String url) {
Animation out = AnimationUtils.loadAnimation(context,
android.R.anim.slide_out_right);
Animation in = AnimationUtils.loadAnimation(context,
android.R.anim.slide_in_left);
viewAnimator.setInAnimation(in);
viewAnimator.setOutAnimation(out);
this.url = url;
setWebView();
}

public void goPrevious(String url) {
Animation out = AnimationUtils.loadAnimation(context, R.anim.fade_in);
Animation in = AnimationUtils.loadAnimation(context, R.anim.fade_out);
viewAnimator.setInAnimation(in);
viewAnimator.setOutAnimation(out);
this.url = url;
setWebView();
}

public void setWebView() {
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setPluginsEnabled(true);
settings.setLightTouchEnabled(true);
webView.setWebViewClient(webClient);
webView.post(new Runnable() {
public void run() {
if (CLEAR_CACHE_ON_LOAD) {
webView.clearCache(true);
}
webView.loadUrl(url);
}
});

}

private WebViewClient webClient = new WebViewClient() {

@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
loadingSpinner.setVisibility(android.view.View.VISIBLE);
webView.setVisibility(android.view.View.INVISIBLE);
}

@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
loadingSpinner.setVisibility(android.view.View.GONE);
webView.setVisibility(android.view.View.VISIBLE);
}

@Override
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {

// TODO move this the appropriate method
Log.e(ReportVideoView.class.getSimpleName(), "Error " + errorCode
+ ": " + description);
Toast.makeText(view.getContext(),
"Error " + errorCode + ": " + description,
Toast.LENGTH_LONG).show();
super.onReceivedError(view, errorCode, description, failingUrl);
}
};
}

This file was deleted.

@@ -26,11 +26,9 @@
import android.support.v4.app.FragmentMapActivity;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.view.ViewStub;
import android.view.View;
import android.widget.ViewAnimator;

import com.google.android.maps.MapView;
import com.ushahidi.android.app.R;
@@ -71,14 +69,17 @@ public class ViewReportView extends com.ushahidi.android.app.views.View {

private Context context;

private LinearLayout viewReportRoot;
private ViewAnimator viewReportRoot;

public ListPhotoAdapter photoAdapter;
public ListNewsAdapter newsAdapter;
public ListVideoAdapter videoAdapter;

public ViewReportView(FragmentMapActivity activity) {
super(activity);
this.context = activity;

viewReportRoot = (LinearLayout) activity
viewReportRoot = (ViewAnimator) activity
.findViewById(R.id.view_report_root);

mapView = (MapView) activity.findViewById(R.id.loc_map);
@@ -89,6 +90,11 @@ public ViewReportView(FragmentMapActivity activity) {
body = (TextView) activity.findViewById(R.id.desc);
status = (TextView) activity.findViewById(R.id.status);
listNews = (ListView) activity.findViewById(R.id.list_news);

photoAdapter = new ListPhotoAdapter(activity);
newsAdapter = new ListNewsAdapter(activity);
videoAdapter = new ListVideoAdapter(activity);

listNewsEmptyView = (TextView) activity
.findViewById(R.id.empty_list_for_news);
if (listNewsEmptyView != null) {
@@ -138,7 +144,7 @@ public ViewReportView(ViewGroup activity, Context context) {
*/
mapView = (MapView) activity.findViewById(R.id.loc_map);
title = (TextView) activity.findViewById(R.id.title);
category = (TextView)activity.findViewById(R.id.category);
category = (TextView) activity.findViewById(R.id.category);
date = (TextView) activity.findViewById(R.id.date);
location = (TextView) activity.findViewById(R.id.location);
body = (TextView) activity.findViewById(R.id.desc);
@@ -32,119 +32,14 @@
android:label="@string/app_name" android:name=".MainApplication"
android:theme="@style/Theme.Sherlock"
android:hardwareAccelerated="true" android:debuggable="true">
<service android:name=".BackgroundService" />
<uses-library android:name="com.google.android.maps" />
<activity android:name=".SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity android:name=".Dashboard" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Incidents List -->
<activity android:name=".IncidentList"
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:label="@string/view_incident">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="org.addhen.ushahidi.INCIDENTS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="org.addhen.ushahidi.NEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Incidents Map -->
<activity android:name=".IncidentMap"
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:label="@string/view_incident">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Checkins Map -->
<activity android:name=".checkin.CheckinMap"
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:label="@string/view_checkins">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- List Checkins -->
<activity android:name=".checkin.CheckinList"
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:label="@string/view_checkins">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- View Incidents -->
<activity android:name=".IncidentView" android:label="@string/view_incident">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- reports tabs -->
<activity android:name=".IncidentTab" android:label="@string/reports">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

</activity>

<!-- Add a new incidents -->
<activity
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:name=".IncidentAdd" android:label="@string/add_incident">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:name=".IncidentAdd" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.CHOOSER" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>

<!-- Add location -->
<activity android:name=".MapLocation" android:label="@string/add_location">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Settings -->
<activity android:name=".Settings"
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
@@ -164,39 +59,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- View Checkins -->
<activity android:name=".checkin.CheckinView" android:label="@string/view_checkins">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Preview Images -->
<activity android:name=".ui.ImagePreviewer" android:label="@string/preview_photo"

android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- About -->
<activity android:name=".About" android:label="@string/ushahidi_about">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Add a check in -->
<activity android:name=".checkin.CheckinActivity"

android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:label="@string/checkin_btn" />


<!-- New Fragment Activities -->

@@ -320,7 +182,31 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</activity>

<!-- Launch View Photos -->
<activity android:name=".ui.phone.ViewReportPhotoActivity" android:label="@string/photos">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Launch View News -->
<activity android:name=".ui.phone.ViewReportNewsActivity" android:label="@string/news">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- Launch View Video -->
<activity android:name=".ui.phone.ViewReportVideoActivity" android:label="@string/video">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<!-- View Checkins -->
<activity android:name=".ui.phone.ViewCheckinActivity" android:label="@string/checkins">
@@ -355,26 +241,6 @@
</intent-filter>
</receiver>

<!-- Search dialog -->
<!-- The default activity of the app. Can also display search results. -->
<activity android:name=".DeploymentSearch"
android:configChanges="screenLayout|orientation|keyboardHidden|touchscreen|navigation"
android:label="@string/search_label">

<!-- Receives the search request. -->
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>

<!-- Points to searchable meta data. -->
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>

<!-- Provides search suggestions for deployments. -->
<provider android:name=".data.DeploymentProvider"
android:authorities="com.ushahidi.android.app.data.deploymentprovider"
android:syncable="false" />
</application>

</manifest>