<ListView
android:id="@+id/liste"
android:layout_width="match_parent"
- android:layout_height="0dp"
+ android:layout_height="0dp"
android:layout_weight="1"
android:divider="@null"
android:dividerHeight="0dp" >
android:gravity="center"
android:orientation="vertical" >
-
<LinearLayout
android:id="@+id/loading"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_width="320dip"
+ android:layout_height="wrap_content"
+ android:background="@drawable/shadow"
android:gravity="center_vertical"
android:orientation="vertical" >
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/loading" />
-
- </LinearLayout>
+ </LinearLayout>
<LinearLayout
android:id="@+id/loadingLoadingInfo"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_width="320dp"
+ android:layout_height="wrap_content"
+ android:background="@drawable/shadow"
android:gravity="center_vertical"
android:orientation="vertical" >
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
+ android:text="@string/success"
android:textColor="#45C63B"
- android:textSize="35sp"
- android:text="@string/success" />
+ android:textSize="35sp" />
<TextView
android:id="@+id/textView1LoadingInfoSub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
+ android:text="@string/retrievePersonnelInfo"
android:textColor="#179CD5"
- android:textSize="25sp"
- android:text="@string/retrievePersonnelInfo" />
-
+ android:textSize="25sp" />
</LinearLayout>
<LinearLayout
+ android:id="@+id/connect_content"
android:layout_width="320dip"
android:layout_height="wrap_content"
android:background="@drawable/shadow"
android:padding="20dp" >
<TextView
-
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item
- android:id="@+id/action_search"
- android:actionViewClass="android.widget.SearchView"
- android:icon="@android:drawable/ic_menu_search"
- android:showAsAction="always"
- android:title=""/>
<item
android:id="@+id/action_sort"
android:icon="@android:drawable/ic_menu_sort_by_size"
<string name="logout">DĂ©connexion</string>
<string name="authentication">Authentification</string>
<string name="funding_progress">Progression du financement</string>
- <string name="sort_by">Sort by</string>
+ <string name="sort_by">Trier par</string>
<string name="biggest_project">Le plus gros</string>
<string name="smallest_project">Le plus petit</string>
<string name="most_avanced">Le plus avancé</string>
try {
String texte = context.getResources().getString(R.string.distance);
distance.setText(
- texte + Calcul.diplayDistance(Share.position,
+ texte +" " + Calcul.diplayDistance(Share.position,
projet.getPosition()));
distance.setVisibility(View.VISIBLE);
} catch (NullPointerException e) {
int size = Utility.getDrawableSize();
for(int i = 0; i < size ; i++){
ImageView image = new ImageView(context);
+
image.setImageDrawable(getResources().getDrawable(Utility.getDrawable(i)));
- layout.addView(image,1);
- layout.setId(i);
- layout.setOnClickListener(new OnClickListener(){
+ image.setId(i);
+ image.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
}
});
+
+ layout.addView(image,1);
}
return view;
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
- case R.id.action_search:
- search(item);
- break;
case R.id.action_sort:
sort();
break;
private LinearLayout loading;
private LinearLayout loadingPersonnelInfo;
+ private LinearLayout connect_content;
private Fragment _this;
loading = (LinearLayout) view.findViewById(R.id.loading);
loading.setVisibility(View.GONE);
+ connect_content = (LinearLayout) view.findViewById(R.id.connect_content);
+ connect_content.setVisibility(View.VISIBLE);
+
loadingPersonnelInfo = (LinearLayout) view.findViewById(R.id.loadingLoadingInfo);
loadingPersonnelInfo.setVisibility(View.GONE);
return;
}
-
+ connect_content.setVisibility(View.GONE);
loading.setVisibility(View.VISIBLE);
String login = m_login.getText().toString();
String password = m_password.getText().toString();
@Override
public void errorUsernamePasswordDoesNotMatch(
String username, String password) {
-
+
+ connect_content.setVisibility(View.VISIBLE);
+ loading.setVisibility(View.GONE);
Toast.makeText(context,
"Login ou mot de passe incorect",
Toast.LENGTH_LONG).show();
@Override
public void errorServer() {
+
Toast.makeText(getActivity().getBaseContext(),
"Une erreur s'est produite", Toast.LENGTH_SHORT)
.show();
@Override
public void onPrepareOptionsMenu(Menu menu) {
- menu.findItem(R.id.action_search).setVisible(false);
menu.findItem(R.id.action_sort).setVisible(false);
}
@Override
public void onPrepareOptionsMenu(Menu menu) {
- menu.findItem(R.id.action_search).setVisible(false);
menu.findItem(R.id.action_sort).setVisible(false);
}
package adullact.publicrowdfunding.model.local.ressource;
+import org.joda.time.DateTime;
+
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
-import org.joda.time.DateTime;
-
-import rx.Observable;
import adullact.publicrowdfunding.model.local.cache.Cache;
import adullact.publicrowdfunding.model.local.callback.WhatToDo;
import adullact.publicrowdfunding.model.local.utilities.Utility;
import adullact.publicrowdfunding.model.server.entities.SimpleServerResponse;
import adullact.publicrowdfunding.model.server.event.ListerEvent;
import adullact.publicrowdfunding.model.server.request.ListerRequest;
+import rx.Observable;
/**
* @author Ferrand and Nelaupe
import java.util.ArrayList;
import java.util.Map;
-import rx.Observable;
import adullact.publicrowdfunding.model.local.cache.CacheSet;
import adullact.publicrowdfunding.model.local.callback.HoldAllToDo;
import adullact.publicrowdfunding.model.local.callback.HoldToDo;
import adullact.publicrowdfunding.model.server.entities.SimpleServerResponse;
import adullact.publicrowdfunding.model.server.event.CreateEvent;
import adullact.publicrowdfunding.model.server.event.DeleteEvent;
+import rx.Observable;
/**
* @author Ferrand and Nelaupe
this.m_funding = new CacheSet<Funding>();
for(final ServerFunding serverFunding : detailedServerUser.fundedProjects) {
- m_funding.add(new Funding().makeCopyFromServer(serverFunding).getCache(Integer.toString(serverFunding.id)));
+ m_funding.add(new Funding().makeCopyFromServer(serverFunding).getCache());
}
return this;
}
}
}
- $response = $dbh->prepare('SELECT *, p.active, p.validate FROM pub_Bookmark LEFT JOIN pub_Project p ON (pub_Bookmark.projectId = p.id)
- WHERE userId = :pseudo
+ $response = $dbh->prepare('SELECT pub_Bookmark.*, pub_Project.active, pub_Project.validate FROM pub_Bookmark, pub_Project
+ WHERE userId = :pseudo AND pub_Bookmark.projectId = pub_Project.id
');
$response->execute(['pseudo' => $this->element]);
}
// Vue que j'affiche qu'une fiche projet
- $response = $dbh->prepare('SELECT * FROM pub_Funding LEFT JOIN pub_Project p ON (pub_Funding.projectId = p.id)
- WHERE userId = :pseudo group by projectId
+ $response = $dbh->prepare('SELECT pub_Funding.*, pub_Project.active, pub_Project.validate FROM pub_Funding, pub_Project
+ WHERE userId = :pseudo AND pub_Funding.projectId = pub_Project.id
');
$response->execute(['pseudo' => $this->element]);