1. orleonsoft
  2. BarcampMed Android

Commits

Fabian Leon  committed a933a55 Merge with conflicts

Merge branch 'master' of https://bitbucket.org/orleonsoft/barcampmed-android

Conflicts:
Barcamp/src/com/orleonsoft/android/barcamp/UnconferenceDetailActivity.java

  • Participants
  • Parent commits 85b14fa, 85d2662
  • Branches master

Comments (0)

Files changed (23)

File Barcamp/AndroidManifest.xml

View file
  • Ignore whitespace
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.orleonsoft.android.barcamp"
+    package="com.orleonsoft.android.barcampmed"
     android:versionCode="1"
     android:versionName="1.0" >
 
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name" >
         <activity
-            android:name=".HomeActivity"
+            android:name="com.orleonsoft.android.barcamp.HomeActivity"
+            android:screenOrientation="portrait"
             android:theme="@android:style/Theme.NoTitleBar" >
         </activity>
         <activity
-            android:name=".SplashScreenActivity"
+            android:name="com.orleonsoft.android.barcamp.SplashScreenActivity"
             android:screenOrientation="portrait"
             android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
             <intent-filter>
             </intent-filter>
         </activity>
         <activity
-            android:name="ListUnconferencesActivity"
+            android:name="com.orleonsoft.android.barcamp.ListUnconferencesActivity"
+              android:screenOrientation="portrait"
             android:theme="@android:style/Theme.NoTitleBar" >
         </activity>
         <activity
-            android:name="UnconferenceDetailActivity"
+            android:name="com.orleonsoft.android.barcamp.UnconferenceDetailActivity"
+              android:screenOrientation="portrait"
             android:theme="@android:style/Theme.NoTitleBar" >
         </activity>
         <activity
-            android:name="AcercaDeActivity"
+            android:name="com.orleonsoft.android.barcamp.AcercaDeActivity"
+              android:screenOrientation="portrait"
             android:theme="@android:style/Theme.Dialog" >
         </activity>
     </application>

File Barcamp/res/drawable-mdpi/ic_ab_back_holo_dark.png

  • Ignore whitespace
Added
New image

File Barcamp/res/drawable/selector_action_back.xml

View file
  • Ignore whitespace
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@color/dark_gray" android:state_pressed="false" android:state_selected="false"/>
+    <item android:drawable="@color/ligth_blue" android:state_pressed="true"/>
+    <item android:drawable="@color/ligth_blue" android:state_pressed="false" android:state_selected="true"/>
+
+</selector>

File Barcamp/res/layout/action_bar.xml

View file
  • Ignore whitespace
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="48dp"
-    android:background="#1a1a1a"
-    android:padding="2dp" >
-    
+    android:background="@color/dark_gray" >
+	<RelativeLayout 
+	android:id="@+id/back"
+    android:layout_width="wrap_content"
+    android:layout_height="match_parent"
+    android:background="@drawable/selector_action_back"
+     >
     <ImageView
         android:id="@+id/ic_previous"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentLeft="true"
-        android:layout_alignParentTop="true"
-        android:visibility="gone"
+        android:layout_centerVertical="true"
         android:contentDescription="@string/app_name"
-        android:src="@drawable/previous" />
-    
+        android:src="@drawable/ic_ab_back_holo_dark"
+        android:visibility="gone" />
 
     <ImageView
+        android:padding="5dp"
         android:id="@+id/ic_app_icon"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-       android:layout_toRightOf="@+id/ic_previous"
         android:layout_alignParentTop="true"
+        android:layout_toRightOf="@+id/ic_previous"
         android:contentDescription="@string/app_name"
         android:src="@drawable/ic_launcher" />
+    
+    </RelativeLayout>
 
     <ImageView
         android:id="@+id/but_action_about"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:layout_alignParentRight="true"
-        android:layout_alignParentTop="true"
+        android:layout_marginRight="10dp"
+        android:layout_centerVertical="true"
         android:contentDescription="@string/app_name"
         android:src="@drawable/selector_action_about" />
 
     <ImageView
         android:id="@+id/but_action_share"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
+        android:layout_height="match_parent"
+        android:layout_centerVertical="true"
         android:layout_marginRight="10dp"
         android:layout_toLeftOf="@+id/but_action_about"
         android:contentDescription="@string/app_name"
         android:src="@drawable/selector_action_share" />
-
+    
+    
     <ImageView
         android:id="@+id/but_action_refresh"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
+        android:layout_height="match_parent"
+        android:layout_centerVertical="true"
         android:layout_marginRight="10dp"
         android:layout_toLeftOf="@+id/but_action_share"
         android:contentDescription="@string/app_name"
-        android:src="@drawable/selector_action_refresh" />
+        android:src="@drawable/selector_action_refresh"
+        android:visibility="gone"  />
+    
+
+   
 
 </RelativeLayout>

File Barcamp/res/layout/details_unconference_screen.xml

View file
  • Ignore whitespace
 <?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/content"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@android:color/black"
-    android:padding="10dp" >
+    android:layout_height="wrap_content" >
 
-    <RelativeLayout
-        android:id="@+id/content"
+    <include
+        android:id="@+id/action_bar"
+        android:layout_alignParentTop="true"
+        layout="@layout/action_bar" />
+
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content" >
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/action_bar"
+        android:background="@android:color/black"
+        android:scrollbars="none"
+        android:padding="5dp" >
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" >
 
-        <TextView
-            android:id="@+id/lab_name_unconference"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:text="@string/app_name"
-            android:textSize="22sp"
-            android:textStyle="bold" />
+            <TextView
+                android:id="@+id/lab_name_unconference"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_below="@+id/action_bar"
+                android:layout_gravity="center_vertical"
+                android:layout_toLeftOf="@+id/img_favorite"
+                android:text="@string/app_name"
+                android:textSize="22sp"
+                android:textStyle="bold" />
 
-        <ImageView
-            android:id="@+id/img_favorite"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
-            android:layout_alignTop="@+id/lab_name_unconference"
-            android:layout_gravity="center_vertical"
-            android:adjustViewBounds="true"
-            android:contentDescription="@string/app_name"
-            android:src="@drawable/ic_unfavorite" />
+            <ImageView
+                android:id="@+id/img_favorite"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_below="@+id/action_bar"
+                android:layout_gravity="center_vertical"
+                android:adjustViewBounds="true"
+                android:contentDescription="@string/app_name"
+                android:src="@drawable/ic_unfavorite" />
 
-        <View
-            android:id="@+id/line"
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_below="@+id/lab_name_unconference"
-            android:layout_marginTop="2dp"
-            android:background="@color/ligth_blue" />
+            <View
+                android:id="@+id/line"
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:layout_below="@+id/lab_name_unconference"
+                android:layout_marginTop="2dp"
+                android:background="@color/ligth_blue" />
 
-        <TextView
-            android:id="@+id/lab_schedule"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/line"
-            android:layout_marginTop="4dp"
-            android:text="@string/app_name"
-            android:textColor="@color/blue"
-            android:textSize="18sp" />
+            <TextView
+                android:id="@+id/lab_schedule"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/line"
+                android:layout_marginTop="4dp"
+                android:text="@string/app_name"
+                android:textColor="@color/blue"
+                android:textSize="18sp" />
 
-        <TextView
-            android:id="@+id/lab_description"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/lab_schedule"
-            android:layout_marginTop="4dp"
-            android:gravity="left"
-            android:text="@string/lab_programacion"
-            android:textSize="18sp" />
+            <TextView
+                android:id="@+id/lab_description"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/lab_schedule"
+                android:layout_marginTop="4dp"
+                android:gravity="left"
+                android:text="@string/lab_programacion"
+                android:textSize="18sp" />
 
-        <TextView
-            android:id="@+id/lab_speakers"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/lab_description"
-            android:layout_marginTop="4dp"
-            android:text="@string/title_activity_home"
-            android:textColor="@color/blue"
-            android:textSize="14sp" />
+            <TextView
+                android:id="@+id/lab_speakers"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/lab_description"
+                android:layout_marginTop="4dp"
+                android:text="@string/title_activity_home"
+                android:textColor="@color/blue"
+                android:textSize="14sp" />
 
-        <TextView
-            android:id="@+id/lab_keywords"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/lab_speakers"
-            android:layout_marginTop="4dp"
-            android:text="@string/title_activity_home"
-            android:textColor="@color/blue"
-            android:textSize="14sp" />
-    </RelativeLayout>
+            <TextView
+                android:id="@+id/lab_keywords"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/lab_speakers"
+                android:layout_marginTop="4dp"
+                android:text="@string/title_activity_home"
+                android:textColor="@color/blue"
+                android:textSize="14sp" />
+        </RelativeLayout>
+    </ScrollView>
 
-</ScrollView>
+</RelativeLayout>

File Barcamp/res/layout/salas_panel.xml

View file
  • Ignore whitespace
         android:layout_height="match_parent"
         android:layout_below="@+id/img_prog_logo"
         android:layout_marginTop="10dp"
-        android:drawSelectorOnTop="false" />
+        android:drawSelectorOnTop="false"
+        
+         />
 
 </RelativeLayout>

File Barcamp/res/layout/unconference_row.xml

View file
  • Ignore whitespace
         android:text="@string/app_name"
         android:layout_toLeftOf="@+id/img_favorite"
         android:layout_alignParentLeft="true"
-        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:textAppearance="?android:attr/textAppearanceMedium"
         android:textColor="@android:color/white"
         android:textStyle="bold" />
     

File Barcamp/res/layout/unconference_screen.xml

View file
  • Ignore whitespace
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:padding="5dp"
+    
    >
+   
+     <include 
+        android:id="@+id/action_bar"
+        layout="@layout/action_bar"
+        android:layout_alignParentTop="true"
+        />
 
     <TextView
         android:id="@+id/lab_name_place"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_below="@+id/action_bar"
         android:text="@string/app_name"
+        
         android:textAppearance="?android:attr/textAppearanceLarge"
         android:textColor="@android:color/white"
         android:textStyle="bold" />

File Barcamp/res/values/colors.xml

View file
  • Ignore whitespace
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
+
     <color name="blue">#00aeef</color>
-     <color name="ligth_blue">#57CAF4</color>
-     <color name="pink">#C0C0C0</color>
-    
+    <color name="ligth_blue">#57CAF4</color>
+    <color name="pink">#C0C0C0</color>
+    <color name="dark_gray">#1a1a1a</color>
+
 </resources>

File Barcamp/src/com/orleonsoft/android/barcamp/AcercaDeActivity.java

View file
  • Ignore whitespace
 
 import android.app.Activity;
 import android.os.Bundle;
+import com.orleonsoft.android.barcampmed.R;
 
 public class AcercaDeActivity extends Activity {
 	

File Barcamp/src/com/orleonsoft/android/barcamp/AppsConstants.java

View file
  • Ignore whitespace
 
 	String LOG_TAG = "com.orleonsoft.android.barcamp";
 
+	String SHARE_MSJ= "Descarga ya la aplicaci�n de @Barcamp_Med y disfruta del contenido de este evento ,";
+	String  SHARE_SUBJECT = "Barcamp Med 2012";
 	String TWITTER_ACCOUNT = "@Barcamp_Med";
+	
+	String LINK_PLAY_STORE = "https://play.google.com/store/apps/details?id=com.orleonsoft.android.barcampmed";
 
 	String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
 	String DATE_FORMAT = "yyyy-MM-dd";

File Barcamp/src/com/orleonsoft/android/barcamp/HomeActivity.java

View file
  • Ignore whitespace
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.ImageView;
+import android.widget.Toast;
 
 import com.orleonsoft.android.barcamp.database.BDAdapter;
 import com.orleonsoft.android.barcamp.network.JSONParser;
+import com.orleonsoft.android.barcampmed.R;
 import com.viewpagerindicator.TitlePageIndicator;
 
 public class HomeActivity extends FragmentActivity implements OnClickListener{
 	
 	ImageView butActionShare;
 	ImageView butActionAbout;
+	ImageView butActionRefresh;
 
 	@Override
 	public void onCreate(Bundle savedInstanceState) {
 		
 		butActionAbout=(ImageView)findViewById(R.id.but_action_about);
 		butActionShare=(ImageView)findViewById(R.id.but_action_share);
+		butActionRefresh=(ImageView)findViewById(R.id.but_action_refresh);
+		
+		butActionRefresh.setVisibility(View.VISIBLE);
+		
 		
 		butActionAbout.setOnClickListener(this);
 		butActionShare.setOnClickListener(this);
+		butActionRefresh.setOnClickListener(this);
 
 			
 		mListSalasFragment = new ListSalasFragment();
 			break;
 			
 		case R.id.but_action_share:
-			Utils.share(HomeActivity.this, "Barcamp Med", "Descarga ya la aplicaci�n de Barcamp");
+			Utils.share(HomeActivity.this, AppsConstants.SHARE_SUBJECT, AppsConstants.SHARE_MSJ+" "+AppsConstants.LINK_PLAY_STORE);
+			break;
+			
+		case R.id.but_action_refresh:
+			Toast.makeText(HomeActivity.this, "Pulso refresh", Toast.LENGTH_SHORT).show();
 			break;
 
 		default:

File Barcamp/src/com/orleonsoft/android/barcamp/ListFavoritesFragment.java

View file
  • Ignore whitespace
 
 import com.orleonsoft.android.barcamp.database.BDAdapter;
 import com.orleonsoft.android.barcamp.network.Unconference;
+import com.orleonsoft.android.barcampmed.R;
 
 public class ListFavoritesFragment extends Fragment {
 

File Barcamp/src/com/orleonsoft/android/barcamp/ListSalasFragment.java

View file
  • Ignore whitespace
 
 import com.orleonsoft.android.barcamp.database.BDAdapter;
 import com.orleonsoft.android.barcamp.network.Place;
+import com.orleonsoft.android.barcampmed.R;
 
 public class ListSalasFragment extends Fragment {
 

File Barcamp/src/com/orleonsoft/android/barcamp/ListUnconferencesActivity.java

View file
  • Ignore whitespace
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.orleonsoft.android.barcamp.database.BDAdapter;
 import com.orleonsoft.android.barcamp.network.Unconference;
+import com.orleonsoft.android.barcampmed.R;
 
-public class ListUnconferencesActivity extends ListActivity {
+public class ListUnconferencesActivity extends ListActivity implements OnClickListener{
 
 	private LayoutInflater mInflater;
 	private ArrayList<Unconference> mListUnconferences;
 	private TextView mLabNamePlace;
 	private UnconferencesEfficientAdapter mListAdapter;
 	private long mIdPlace;
+	
+	ImageView butActionShare;
+	ImageView butActionAbout;
+	ImageView imgBack;
+	RelativeLayout butHome;
 
 	public ListUnconferencesActivity() {
 		// TODO Auto-generated constructor stub
 	public void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.unconference_screen);
+		
+		butActionAbout=(ImageView)findViewById(R.id.but_action_about);
+		butActionShare=(ImageView)findViewById(R.id.but_action_share);
+		butHome=(RelativeLayout)findViewById(R.id.back);
+		imgBack=(ImageView)findViewById(R.id.ic_previous);
+		imgBack.setVisibility(View.VISIBLE);
+		
+		butActionAbout.setOnClickListener(this);
+		butHome.setOnClickListener(this);
+		butActionShare.setOnClickListener(this);
+		
 
 		mLabNamePlace = (TextView) findViewById(R.id.lab_name_place);
 
 		dbAdapter.close();
 		return result != 0;
 	}
+	
+	@Override
+	public void onClick(View v) {
+		switch (v.getId()) {
+		case R.id.but_action_about:
+			startActivity(new Intent(ListUnconferencesActivity.this, AcercaDeActivity.class));
+			break;
+			
+		case R.id.but_action_share:
+			Utils.share(ListUnconferencesActivity.this, AppsConstants.SHARE_SUBJECT, AppsConstants.SHARE_MSJ+" "+AppsConstants.LINK_PLAY_STORE);
+			break;
+			
+		case R.id.back:
+			Intent intent = new Intent(this,HomeActivity.class);
+			intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+		       startActivity(intent);
+			break;
+	
+		default:
+			break;
+		}
+		
+	}
 }

File Barcamp/src/com/orleonsoft/android/barcamp/PagerAdapter.java

View file
  • Ignore whitespace
 		case 0:
 			return "Favoritas";	
 		case 1:
-			return "Programacion";	
+			return "Programacin";	
 		case 2:
 			return "Twitter";
 		case 3:
 	}
 	
 	
-	
-	
 	@Override
 	public int getCount() {
 		return fragments.size();

File Barcamp/src/com/orleonsoft/android/barcamp/PhotosFragment.java

View file
  • Ignore whitespace
 
 import com.orleonsoft.android.barcamp.network.JSONParser;
 import com.orleonsoft.android.barcamp.network.PhotoBarcamp;
+import com.orleonsoft.android.barcampmed.R;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.os.AsyncTask;

File Barcamp/src/com/orleonsoft/android/barcamp/PlainFragment.java

View file
  • Ignore whitespace
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import com.orleonsoft.android.barcampmed.R;
 
 public class PlainFragment extends Fragment {
 

File Barcamp/src/com/orleonsoft/android/barcamp/SplashScreenActivity.java

View file
  • Ignore whitespace
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
+import com.orleonsoft.android.barcampmed.R;
 
 /**
  * Splash de la aplicacion

File Barcamp/src/com/orleonsoft/android/barcamp/TwitterFeedFragment.java

View file
  • Ignore whitespace
 import com.orleonsoft.android.barcamp.network.AdapterListTweets;
 import com.orleonsoft.android.barcamp.network.JSONParser;
 import com.orleonsoft.android.barcamp.network.TweetMessage;
+import com.orleonsoft.android.barcampmed.R;
 
 import android.os.Bundle;
 import android.support.v4.app.Fragment;

File Barcamp/src/com/orleonsoft/android/barcamp/UnconferenceDetailActivity.java

View file
  • Ignore whitespace
 
 import android.app.Activity;
 import android.content.ContentValues;
+import android.content.Intent;
 import android.database.Cursor;
 import android.graphics.BitmapFactory;
 import android.os.Bundle;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.ImageView;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.orleonsoft.android.barcamp.database.BDAdapter;
 import com.orleonsoft.android.barcamp.network.Unconference;
+import com.orleonsoft.android.barcampmed.R;
 
 public class UnconferenceDetailActivity extends Activity implements
 		OnClickListener {
 	private ImageView mImgFavorite;
 	private boolean esFavorito;
 
+	ImageView butActionShare;
+	ImageView butActionAbout;
+	ImageView imgBack;
+	RelativeLayout butHome;
+
 	@Override
 	protected void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		mLabKeyWords = (TextView) findViewById(R.id.lab_keywords);
 		mImgFavorite = (ImageView) findViewById(R.id.img_favorite);
 
+		butActionAbout = (ImageView) findViewById(R.id.but_action_about);
+		butActionShare = (ImageView) findViewById(R.id.but_action_share);
+		butHome = (RelativeLayout) findViewById(R.id.back);
+		imgBack = (ImageView) findViewById(R.id.ic_previous);
+		imgBack.setVisibility(View.VISIBLE);
+
+		butActionAbout.setOnClickListener(this);
+		butHome.setOnClickListener(this);
+		butActionShare.setOnClickListener(this);
+
 		mUnconference = new Unconference();
 		Bundle extras = getIntent().getExtras();
 		if (extras != null) {
 	@Override
 	public void onClick(View v) {
 
-		if (esFavorito) {
-			UnconferenceDetailActivity.this.runOnUiThread(new Runnable() {
-				@Override
-				public void run() {
-					if (borrarFavorito(mUnconference.getIdentifier())) {
-						esFavorito = false;
-						mImgFavorite.setImageBitmap(BitmapFactory
-								.decodeResource(getResources(),
-										R.drawable.ic_unfavorite));
+		switch (v.getId()) {
+		case R.id.but_action_about:
+			startActivity(new Intent(UnconferenceDetailActivity.this,
+					AcercaDeActivity.class));
+			break;
+
+		case R.id.but_action_share:
+			Utils.share(UnconferenceDetailActivity.this,
+					AppsConstants.SHARE_SUBJECT, AppsConstants.SHARE_MSJ + " "
+							+ AppsConstants.LINK_PLAY_STORE);
+			break;
+
+		case R.id.back:
+			Intent intent = new Intent(this, HomeActivity.class);
+			intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+			startActivity(intent);
+			break;
+
+		case R.id.img_favorite:
+			if (esFavorito) {
+				UnconferenceDetailActivity.this.runOnUiThread(new Runnable() {
+					@Override
+					public void run() {
+						if (borrarFavorito(mUnconference.getIdentifier())) {
+							esFavorito = false;
+							mImgFavorite.setImageBitmap(BitmapFactory
+									.decodeResource(getResources(),
+											R.drawable.ic_unfavorite));
+						}
 					}
-				}
-			});
-		} else {
-			UnconferenceDetailActivity.this.runOnUiThread(new Runnable() {
-				@Override
-				public void run() {
-					if ((insertarFavorito(mUnconference.getIdentifier()) != -1)) {
-						esFavorito = true;
-						mImgFavorite.setImageBitmap(BitmapFactory
-								.decodeResource(getResources(),
-										R.drawable.ic_favorite));
+				});
+			} else {
+				UnconferenceDetailActivity.this.runOnUiThread(new Runnable() {
+					@Override
+					public void run() {
+						if ((insertarFavorito(mUnconference.getIdentifier()) != -1)) {
+							esFavorito = true;
+							mImgFavorite.setImageBitmap(BitmapFactory
+									.decodeResource(getResources(),
+											R.drawable.ic_favorite));
+						}
 					}
-				}
-			});
+				});
+			}
+			break;
+		default:
+			break;
 		}
 	}
 

File Barcamp/src/com/orleonsoft/android/barcamp/Utils.java

View file
  • Ignore whitespace
  */
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
+import com.orleonsoft.android.barcampmed.R;
 
 /**
  *  Clase donde estan metodos de utilidad varios

File Barcamp/src/com/orleonsoft/android/barcamp/network/AdapterListTweets.java

View file
  • Ignore whitespace
 
 import java.util.ArrayList;
 
-import com.orleonsoft.android.barcamp.R;
+import com.orleonsoft.android.barcampmed.R;
 import android.content.Context;
 import android.text.method.LinkMovementMethod;
 import android.text.util.Linkify;
 		
 		Linkify.addLinks(labMessage, Linkify.WEB_URLS);
 		labMessage.setMovementMethod(LinkMovementMethod.getInstance());
-		
-		
-		
+			
 		TextView labDateTime = (TextView) view
 				.findViewById(R.id.lab_date_time);
-
-		labMessage.setText(tweets.get(position).getMesagge());
+		//se hace substring (12) porque el mensaje trae el username de barcamp en twitter y no se quiere mostrar eso en cada row
+		labMessage.setText(tweets.get(position).getMesagge().substring(12));
 		labDateTime.setText(tweets.get(position).getDate());