mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-16 11:30:34 +01:00
layout fix
This commit is contained in:
parent
ff1c9ff7a8
commit
8d3ae2616c
@ -20,8 +20,8 @@
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="autoMirrored" value="true" />
|
||||
<entry key="outputName" value="list_subscriber" />
|
||||
<entry key="sourceFile" value="$USER_HOME$/Schreibtisch/4.svg" />
|
||||
<entry key="outputName" value="add" />
|
||||
<entry key="sourceFile" value="$USER_HOME$/Dokumente/Rest/Entypo SVG/circle-with-plus.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
|
@ -89,8 +89,9 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
|
||||
|
||||
private ImageView profile_image, profile_banner;
|
||||
private EditText name, link, loc, bio;
|
||||
private Button add_banner_btn;
|
||||
private Dialog loadingCircle, closeDialog;
|
||||
private Button addBannerBtn;
|
||||
private View changeBannerBtn;
|
||||
|
||||
private TwitterUser user;
|
||||
private String profileLink, bannerLink;
|
||||
@ -104,7 +105,8 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
|
||||
View header = findViewById(R.id.editprofile_header);
|
||||
profile_image = findViewById(R.id.edit_pb);
|
||||
profile_banner = findViewById(R.id.edit_banner);
|
||||
add_banner_btn = findViewById(R.id.edit_add_banner);
|
||||
addBannerBtn = findViewById(R.id.edit_add_banner);
|
||||
changeBannerBtn = findViewById(R.id.edit_change_banner);
|
||||
name = findViewById(R.id.edit_name);
|
||||
link = findViewById(R.id.edit_link);
|
||||
loc = findViewById(R.id.edit_location);
|
||||
@ -134,7 +136,7 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
|
||||
|
||||
profile_image.setOnClickListener(this);
|
||||
profile_banner.setOnClickListener(this);
|
||||
add_banner_btn.setOnClickListener(this);
|
||||
addBannerBtn.setOnClickListener(this);
|
||||
cancelButton.setOnClickListener(this);
|
||||
loadingCircle.setOnDismissListener(this);
|
||||
}
|
||||
@ -220,8 +222,12 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
|
||||
profile_image.setImageBitmap(image);
|
||||
profileLink = mediaPath;
|
||||
} else {
|
||||
int bannerHeight = profile_banner.getMeasuredWidth() / 3;
|
||||
if (bannerHeight > 0)
|
||||
profile_banner.setMaxHeight(bannerHeight);
|
||||
profile_banner.setImageBitmap(image);
|
||||
add_banner_btn.setVisibility(INVISIBLE);
|
||||
addBannerBtn.setVisibility(INVISIBLE);
|
||||
changeBannerBtn.setVisibility(VISIBLE);
|
||||
bannerLink = mediaPath;
|
||||
}
|
||||
c.close();
|
||||
@ -240,16 +246,17 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int viewId = v.getId();
|
||||
// select net profile image
|
||||
if (v.getId() == R.id.edit_pb) {
|
||||
if (viewId == R.id.edit_pb) {
|
||||
getMedia(REQ_PROFILE_IMG);
|
||||
}
|
||||
// select new banner image
|
||||
else if (v.getId() == R.id.edit_add_banner) {
|
||||
else if (viewId == R.id.edit_add_banner || viewId == R.id.edit_banner) {
|
||||
getMedia(REQ_PROFILE_BANNER);
|
||||
}
|
||||
// stop update
|
||||
else if (v.getId() == R.id.kill_button) {
|
||||
else if (viewId == R.id.kill_button) {
|
||||
loadingCircle.dismiss();
|
||||
}
|
||||
}
|
||||
@ -297,7 +304,11 @@ public class ProfileEditor extends AppCompatActivity implements OnClickListener,
|
||||
Picasso.get().load(pbLink).into(profile_image);
|
||||
if (user.hasBannerImg()) {
|
||||
Picasso.get().load(bnLink).into(profile_banner);
|
||||
add_banner_btn.setVisibility(INVISIBLE);
|
||||
addBannerBtn.setVisibility(INVISIBLE);
|
||||
changeBannerBtn.setVisibility(VISIBLE);
|
||||
} else {
|
||||
addBannerBtn.setVisibility(VISIBLE);
|
||||
changeBannerBtn.setVisibility(INVISIBLE);
|
||||
}
|
||||
name.setText(user.getUsername());
|
||||
link.setText(user.getLink());
|
||||
|
10
app/src/main/res/drawable/add.xml
Normal file
10
app/src/main/res/drawable/add.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector android:autoMirrored="true"
|
||||
android:height="20dp"
|
||||
android:viewportHeight="20"
|
||||
android:viewportWidth="20"
|
||||
android:width="20dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path
|
||||
android:fillColor="#7FFFFFFF"
|
||||
android:pathData="M10,1.6c-4.639,0 -8.4,3.761 -8.4,8.4s3.761,8.4 8.4,8.4s8.4,-3.761 8.4,-8.4S14.639,1.6 10,1.6zM15,11h-4v4H9v-4H5V9h4V5h2v4h4V11z" />
|
||||
</vector>
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/page_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -39,7 +40,8 @@
|
||||
android:background="@drawable/button"
|
||||
android:paddingLeft="@dimen/editprofile_button_padding"
|
||||
android:paddingRight="@dimen/editprofile_button_padding"
|
||||
android:text="@string/editprofile_add_banner" />
|
||||
android:text="@string/editprofile_add_banner"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_banner"
|
||||
@ -52,14 +54,37 @@
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_pb"
|
||||
android:id="@+id/edit_change_banner"
|
||||
android:layout_width="@dimen/editprofile_add_btn_size"
|
||||
android:layout_height="@dimen/editprofile_add_btn_size"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/descr_add_profile_image"
|
||||
app:srcCompat="@drawable/add" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/editprofile_image"
|
||||
android:layout_height="@dimen/editprofile_image"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="@dimen/editprofile_image_margin"
|
||||
android:layout_marginLeft="@dimen/editprofile_image_margin"
|
||||
android:layout_marginRight="@dimen/editprofile_image_margin"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/image_preview" />
|
||||
android:layout_marginEnd="@dimen/editprofile_image_margin"
|
||||
android:layout_marginRight="@dimen/editprofile_image_margin">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_pb"
|
||||
android:layout_width="@dimen/editprofile_image"
|
||||
android:layout_height="@dimen/editprofile_image"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/image_preview" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/editprofile_add_btn_size"
|
||||
android:layout_height="@dimen/editprofile_add_btn_size"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/descr_add_profile_image"
|
||||
app:srcCompat="@drawable/add" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
<string name="info_user_blocked">geblockt!</string>
|
||||
<string name="info_user_unblocked">entblockt!</string>
|
||||
<string name="info_tweet_removed">Tweet gelöscht!</string>
|
||||
<string name="tweet_answering">"antwort "</string>
|
||||
<string name="tweet_answering">"an "</string>
|
||||
<string name="tweet_sent_from">"gesendet von:"</string>
|
||||
<string name="menu_mute_user">Stummschalten</string>
|
||||
<string name="user_unmute">Stummschaltung aufheben</string>
|
||||
@ -175,4 +175,5 @@
|
||||
<string name="info_list_followed">Liste gefolgt</string>
|
||||
<string name="info_list_unfollowed">Liste entfolgt</string>
|
||||
<string name="info_unfollowed">entfolgt!</string>
|
||||
<string name="descr_add_profile_image">Profilbild ändern</string>
|
||||
</resources>
|
@ -75,6 +75,7 @@
|
||||
<dimen name="editprofile_bio_maxheight">150dp</dimen>
|
||||
<dimen name="editprofile_toolbar_height">@dimen/toolbar_height</dimen>
|
||||
<dimen name="editprofile_dummy_height">@dimen/profile_button_height</dimen>
|
||||
<dimen name="editprofile_add_btn_size">40dp</dimen>
|
||||
|
||||
<!--dimens of item_tweet.xml-->
|
||||
<dimen name="tweetitem_profile_small">36sp</dimen>
|
||||
@ -102,7 +103,6 @@
|
||||
<!--dimens of item_list.xml-->
|
||||
<dimen name="listitem_padding">5dp</dimen>
|
||||
<dimen name="listitem_margin">4dp</dimen>
|
||||
<dimen name="listitem_textview_height">20sp</dimen>
|
||||
<dimen name="listitem_icon_size">12sp</dimen>
|
||||
<dimen name="listitem_profile">56sp</dimen>
|
||||
<dimen name="listitem_layout_margin">5dp</dimen>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<string name="confirm_delete_database">delete database?</string>
|
||||
<string name="user_unfollow">unfollow</string>
|
||||
<string name="user_unblock">unblock user</string>
|
||||
<string name="tweet_answering">answering</string>
|
||||
<string name="tweet_answering">"to "</string>
|
||||
<string name="tweet_sent_from">sent from:</string>
|
||||
<string name="user_unmute">un-mute user</string>
|
||||
<string name="directmessage">Direct Message</string>
|
||||
@ -181,7 +181,7 @@
|
||||
<string name="menu_tweet_delete">Delete</string>
|
||||
<string name="menu_tweet_open_browser">Open in Browser</string>
|
||||
<string name="menu_mute_user">mute user</string>
|
||||
<string name="menu_edit_profile">Edit Profile</string>
|
||||
<string name="menu_edit_profile">edit profile</string>
|
||||
<string name="menu_edit_save">save</string>
|
||||
<string name="menu_add_user">add user to list</string>
|
||||
<string name="menu_edit_list">edit list</string>
|
||||
@ -192,4 +192,5 @@
|
||||
<string name="menu_unfollow_list">unfollow list</string>
|
||||
<string name="info_list_followed">Userlist followed</string>
|
||||
<string name="info_list_unfollowed">Userlist unfollowed</string>
|
||||
<string name="descr_add_profile_image">Change profile image</string>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user