reduce the opacity on the background image - issue #563
This commit is contained in:
parent
351dbc4c36
commit
66a1cc421e
|
@ -53,16 +53,19 @@ import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.bumptech.glide.request.target.SimpleTarget;
|
import com.bumptech.glide.request.target.SimpleTarget;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import fr.gouv.etalab.mastodon.R;
|
import fr.gouv.etalab.mastodon.R;
|
||||||
import fr.gouv.etalab.mastodon.asynctasks.PostActionAsyncTask;
|
import fr.gouv.etalab.mastodon.asynctasks.PostActionAsyncTask;
|
||||||
import fr.gouv.etalab.mastodon.asynctasks.RetrieveAccountAsyncTask;
|
import fr.gouv.etalab.mastodon.asynctasks.RetrieveAccountAsyncTask;
|
||||||
|
@ -74,6 +77,7 @@ import fr.gouv.etalab.mastodon.client.APIResponse;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Account;
|
import fr.gouv.etalab.mastodon.client.Entities.Account;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Attachment;
|
import fr.gouv.etalab.mastodon.client.Entities.Attachment;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Error;
|
import fr.gouv.etalab.mastodon.client.Entities.Error;
|
||||||
|
import fr.gouv.etalab.mastodon.client.Entities.Relationship;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.RemoteInstance;
|
import fr.gouv.etalab.mastodon.client.Entities.RemoteInstance;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Status;
|
import fr.gouv.etalab.mastodon.client.Entities.Status;
|
||||||
import fr.gouv.etalab.mastodon.client.HttpsConnection;
|
import fr.gouv.etalab.mastodon.client.HttpsConnection;
|
||||||
|
@ -89,7 +93,6 @@ import fr.gouv.etalab.mastodon.interfaces.OnRetrieveEmojiAccountInterface;
|
||||||
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveFeedsAccountInterface;
|
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveFeedsAccountInterface;
|
||||||
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveFeedsInterface;
|
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveFeedsInterface;
|
||||||
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveRelationshipInterface;
|
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveRelationshipInterface;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Relationship;
|
|
||||||
import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
|
import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
|
||||||
import fr.gouv.etalab.mastodon.sqlite.InstancesDAO;
|
import fr.gouv.etalab.mastodon.sqlite.InstancesDAO;
|
||||||
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
||||||
|
@ -490,11 +493,20 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) {
|
public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) {
|
||||||
ImageView banner_pp = findViewById(R.id.banner_pp);
|
ImageView banner_pp = findViewById(R.id.banner_pp);
|
||||||
banner_pp.setImageBitmap(resource);
|
banner_pp.setImageBitmap(resource);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
if( theme == THEME_LIGHT){
|
||||||
banner_pp.setImageAlpha(60);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
|
banner_pp.setImageAlpha(80);
|
||||||
|
}else {
|
||||||
|
banner_pp.setAlpha(80);
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
banner_pp.setAlpha(60);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
|
banner_pp.setImageAlpha(60);
|
||||||
|
}else {
|
||||||
|
banner_pp.setAlpha(60);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue