added option to disable toolbar overlap, layout fix, bug fix

Signed-off-by: nuclearfog <hatespirit666@gmail.com>
This commit is contained in:
nuclearfog 2021-04-07 19:48:49 +02:00
parent 5707b32e73
commit e71b7110ce
No known key found for this signature in database
GPG Key ID: AA0271FBE406DB98
14 changed files with 173 additions and 68 deletions

View File

@ -101,6 +101,7 @@ public class AppSettings extends AppCompatActivity implements OnClickListener, O
View user_card = findViewById(R.id.settings_data_card); View user_card = findViewById(R.id.settings_data_card);
CompoundButton toggleImg = findViewById(R.id.toggleImg); CompoundButton toggleImg = findViewById(R.id.toggleImg);
CompoundButton toggleAns = findViewById(R.id.toggleAns); CompoundButton toggleAns = findViewById(R.id.toggleAns);
CompoundButton toolbarOverlap = findViewById(R.id.settings_toolbar_ov);
SeekBar listSizeSelector = findViewById(R.id.settings_list_seek); SeekBar listSizeSelector = findViewById(R.id.settings_list_seek);
Spinner fontSpinner = findViewById(R.id.spinner_font); Spinner fontSpinner = findViewById(R.id.spinner_font);
enableProxy = findViewById(R.id.settings_enable_proxy); enableProxy = findViewById(R.id.settings_enable_proxy);
@ -159,6 +160,7 @@ public class AppSettings extends AppCompatActivity implements OnClickListener, O
toggleImg.setChecked(settings.getImageLoad()); toggleImg.setChecked(settings.getImageLoad());
toggleAns.setChecked(settings.getAnswerLoad()); toggleAns.setChecked(settings.getAnswerLoad());
enableAPI.setChecked(settings.isCustomApiSet()); enableAPI.setChecked(settings.isCustomApiSet());
toolbarOverlap.setChecked(settings.getToolbarOverlap());
proxyAddr.setText(settings.getProxyHost()); proxyAddr.setText(settings.getProxyHost());
proxyPort.setText(settings.getProxyPort()); proxyPort.setText(settings.getProxyPort());
proxyUser.setText(settings.getProxyUser()); proxyUser.setText(settings.getProxyUser());
@ -192,6 +194,7 @@ public class AppSettings extends AppCompatActivity implements OnClickListener, O
enableProxy.setOnCheckedChangeListener(this); enableProxy.setOnCheckedChangeListener(this);
enableAuth.setOnCheckedChangeListener(this); enableAuth.setOnCheckedChangeListener(this);
hqImage.setOnCheckedChangeListener(this); hqImage.setOnCheckedChangeListener(this);
toolbarOverlap.setOnCheckedChangeListener(this);
fontSpinner.setOnItemSelectedListener(this); fontSpinner.setOnItemSelectedListener(this);
listSizeSelector.setOnSeekBarChangeListener(this); listSizeSelector.setOnSeekBarChangeListener(this);
} }
@ -381,6 +384,14 @@ public class AppSettings extends AppCompatActivity implements OnClickListener, O
else if (c.getId() == R.id.toggleAns) { else if (c.getId() == R.id.toggleAns) {
settings.setAnswerLoad(checked); settings.setAnswerLoad(checked);
} }
// enable high quality images
else if (c.getId() == R.id.settings_image_hq) {
settings.setHighQualityImage(checked);
}
// enable toolbar overlap
else if (c.getId() == R.id.settings_toolbar_ov) {
settings.setToolbarOverlap(checked);
}
// enable proxy settings // enable proxy settings
else if (c.getId() == R.id.settings_enable_proxy) { else if (c.getId() == R.id.settings_enable_proxy) {
if (checked) { if (checked) {
@ -400,10 +411,6 @@ public class AppSettings extends AppCompatActivity implements OnClickListener, O
layout_auth.setVisibility(GONE); layout_auth.setVisibility(GONE);
} }
} }
// enable high quality images
else if (c.getId() == R.id.settings_image_hq) {
settings.setHighQualityImage(checked);
}
// enable custom API setup // enable custom API setup
else if (c.getId() == R.id.settings_set_custom_keys) { else if (c.getId() == R.id.settings_set_custom_keys) {
if (checked) { if (checked) {

View File

@ -81,7 +81,7 @@ public class MainActivity extends AppCompatActivity implements OnTabSelectedList
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.page_main); setContentView(R.layout.page_main);
Toolbar toolbar = findViewById(R.id.profile_toolbar); Toolbar toolbar = findViewById(R.id.home_toolbar);
pager = findViewById(R.id.home_pager); pager = findViewById(R.id.home_pager);
tablayout = findViewById(R.id.home_tab); tablayout = findViewById(R.id.home_tab);
root = findViewById(R.id.main_layout); root = findViewById(R.id.main_layout);

View File

@ -21,6 +21,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import com.squareup.picasso.Callback; import com.squareup.picasso.Callback;
import com.squareup.picasso.Picasso; import com.squareup.picasso.Picasso;
@ -80,7 +82,7 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, OnP
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.page_editprofile); setContentView(R.layout.page_editprofile);
Toolbar toolbar = findViewById(R.id.editprofile_toolbar); Toolbar toolbar = findViewById(R.id.editprofile_toolbar);
View root = findViewById(R.id.page_edit); ConstraintLayout root = findViewById(R.id.page_edit);
ImageView changeImageBtn = findViewById(R.id.profile_change_image_btn); ImageView changeImageBtn = findViewById(R.id.profile_change_image_btn);
profile_image = findViewById(R.id.edit_pb); profile_image = findViewById(R.id.edit_pb);
profile_banner = findViewById(R.id.edit_banner); profile_banner = findViewById(R.id.edit_banner);
@ -91,14 +93,21 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, OnP
link = findViewById(R.id.edit_link); link = findViewById(R.id.edit_link);
loc = findViewById(R.id.edit_location); loc = findViewById(R.id.edit_location);
bio = findViewById(R.id.edit_bio); bio = findViewById(R.id.edit_bio);
loadingCircle = DialogBuilder.createProgress(this, this); loadingCircle = DialogBuilder.createProgress(this, this);
closeDialog = DialogBuilder.create(this, PROFILE_EDITOR_LEAVE, this); closeDialog = DialogBuilder.create(this, PROFILE_EDITOR_LEAVE, this);
errorDialog = DialogBuilder.create(this, PROFILE_EDITOR_ERROR, this); errorDialog = DialogBuilder.create(this, PROFILE_EDITOR_ERROR, this);
toolbar.setTitle(R.string.page_profile_edior); toolbar.setTitle(R.string.page_profile_edior);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
settings = GlobalSettings.getInstance(this); settings = GlobalSettings.getInstance(this);
if (!settings.getToolbarOverlap()) {
ConstraintSet constraints = new ConstraintSet();
constraints.clone(root);
constraints.connect(R.id.edit_banner, ConstraintSet.TOP, R.id.editprofile_toolbar, ConstraintSet.BOTTOM);
constraints.connect(R.id.edit_add_banner, ConstraintSet.TOP, R.id.edit_banner, ConstraintSet.TOP);
constraints.applyTo(root);
}
toolbar.setBackgroundColor(settings.getBackgroundColor() & TOOLBAR_TRANSPARENCY); toolbar.setBackgroundColor(settings.getBackgroundColor() & TOOLBAR_TRANSPARENCY);
changeBannerBtn.setImageResource(R.drawable.add); changeBannerBtn.setImageResource(R.drawable.add);
changeImageBtn.setImageResource(R.drawable.add); changeImageBtn.setImageResource(R.drawable.add);
@ -218,8 +227,11 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, OnP
@Override @Override
public void onSuccess() { public void onSuccess() {
// set toolbar background
if (settings.getToolbarOverlap()) {
AppStyles.setToolbarBackground(ProfileEditor.this, profile_banner, toolbar_background); AppStyles.setToolbarBackground(ProfileEditor.this, profile_banner, toolbar_background);
} }
}
@Override @Override

View File

@ -20,6 +20,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.viewpager.widget.ViewPager; import androidx.viewpager.widget.ViewPager;
import com.google.android.material.tabs.TabLayout; import com.google.android.material.tabs.TabLayout;
@ -155,24 +157,31 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
protected void onCreate(@Nullable Bundle b) { protected void onCreate(@Nullable Bundle b) {
super.onCreate(b); super.onCreate(b);
setContentView(R.layout.page_profile); setContentView(R.layout.page_profile);
toolbar = findViewById(R.id.profile_toolbar);
View root = findViewById(R.id.user_view); View root = findViewById(R.id.user_view);
ConstraintLayout profileView = findViewById(R.id.profile_content);
toolbar = profileView.findViewById(R.id.profile_toolbar);
user_bio = profileView.findViewById(R.id.bio);
following = profileView.findViewById(R.id.following);
follower = profileView.findViewById(R.id.follower);
user_website = profileView.findViewById(R.id.links);
profileImage = profileView.findViewById(R.id.profile_img);
bannerImage = profileView.findViewById(R.id.profile_banner);
toolbarBackground = profileView.findViewById(R.id.profile_toolbar_background);
username = profileView.findViewById(R.id.profile_username);
screenName = profileView.findViewById(R.id.profile_screenname);
user_location = profileView.findViewById(R.id.location);
user_createdAt = profileView.findViewById(R.id.profile_date);
follow_back = profileView.findViewById(R.id.follow_back);
tabLayout = findViewById(R.id.profile_tab); tabLayout = findViewById(R.id.profile_tab);
user_bio = findViewById(R.id.bio);
following = findViewById(R.id.following);
follower = findViewById(R.id.follower);
user_website = findViewById(R.id.links);
profileImage = findViewById(R.id.profile_img);
bannerImage = findViewById(R.id.profile_banner);
toolbarBackground = findViewById(R.id.profile_toolbar_background);
username = findViewById(R.id.profile_username);
screenName = findViewById(R.id.profile_screenname);
user_location = findViewById(R.id.location);
user_createdAt = findViewById(R.id.profile_date);
follow_back = findViewById(R.id.follow_back);
tabPages = findViewById(R.id.profile_pager); tabPages = findViewById(R.id.profile_pager);
settings = GlobalSettings.getInstance(this); settings = GlobalSettings.getInstance(this);
if (!settings.getToolbarOverlap()) {
ConstraintSet constraints = new ConstraintSet();
constraints.clone(profileView);
constraints.connect(R.id.profile_banner, ConstraintSet.TOP, R.id.profile_toolbar, ConstraintSet.BOTTOM);
constraints.applyTo(profileView);
}
following.setCompoundDrawablesWithIntrinsicBounds(R.drawable.following, 0, 0, 0); following.setCompoundDrawablesWithIntrinsicBounds(R.drawable.following, 0, 0, 0);
follower.setCompoundDrawablesWithIntrinsicBounds(R.drawable.follower, 0, 0, 0); follower.setCompoundDrawablesWithIntrinsicBounds(R.drawable.follower, 0, 0, 0);
user_createdAt.setCompoundDrawablesWithIntrinsicBounds(R.drawable.calendar, 0, 0, 0); user_createdAt.setCompoundDrawablesWithIntrinsicBounds(R.drawable.calendar, 0, 0, 0);
@ -547,8 +556,10 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
@Override @Override
public void onSuccess() { public void onSuccess() {
// setup toolbar background // setup toolbar background
if (settings.getToolbarOverlap()) {
AppStyles.setToolbarBackground(UserProfile.this, bannerImage, toolbarBackground); AppStyles.setToolbarBackground(UserProfile.this, bannerImage, toolbarBackground);
} }
}
@Override @Override

View File

@ -10,8 +10,6 @@ import android.widget.TextView;
import org.nuclearfog.twidda.R; import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.database.GlobalSettings; import org.nuclearfog.twidda.database.GlobalSettings;
import static android.util.TypedValue.COMPLEX_UNIT_SP;
/** /**
* Spinner Adapter for font settings * Spinner Adapter for font settings
* *
@ -20,11 +18,6 @@ import static android.util.TypedValue.COMPLEX_UNIT_SP;
*/ */
public class FontAdapter extends BaseAdapter { public class FontAdapter extends BaseAdapter {
/**
* font size of an item
*/
private static final float FONT_SIZE = 24.0f;
/** /**
* android system fonts * android system fonts
*/ */
@ -73,7 +66,6 @@ public class FontAdapter extends BaseAdapter {
textItem = view.findViewById(R.id.dropdown_textitem); textItem = view.findViewById(R.id.dropdown_textitem);
textItem.setText(names[pos]); textItem.setText(names[pos]);
textItem.setTypeface(fonts[pos]); textItem.setTypeface(fonts[pos]);
textItem.setTextSize(COMPLEX_UNIT_SP, FONT_SIZE);
textItem.setTextColor(settings.getFontColor()); textItem.setTextColor(settings.getFontColor());
textItem.setBackgroundColor(settings.getCardColor()); textItem.setBackgroundColor(settings.getCardColor());
view.setBackgroundColor(settings.getBackgroundColor()); view.setBackgroundColor(settings.getBackgroundColor());

View File

@ -16,8 +16,6 @@ import org.nuclearfog.twidda.database.GlobalSettings;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
/** /**
* Adapter class for Location selection spinner * Adapter class for Location selection spinner
* *
@ -26,11 +24,6 @@ import static android.util.TypedValue.COMPLEX_UNIT_DIP;
*/ */
public class LocationAdapter extends BaseAdapter { public class LocationAdapter extends BaseAdapter {
/**
* text size of the items
*/
private static final float TEXT_SIZE = 16.0f;
private GlobalSettings settings; private GlobalSettings settings;
private List<TrendLocation> data = new ArrayList<>(); private List<TrendLocation> data = new ArrayList<>();
@ -104,7 +97,6 @@ public class LocationAdapter extends BaseAdapter {
view = inflater.inflate(R.layout.item_dropdown, parent, false); view = inflater.inflate(R.layout.item_dropdown, parent, false);
} }
textItem = view.findViewById(R.id.dropdown_textitem); textItem = view.findViewById(R.id.dropdown_textitem);
textItem.setTextSize(COMPLEX_UNIT_DIP, TEXT_SIZE);
textItem.setBackgroundColor(settings.getCardColor()); textItem.setBackgroundColor(settings.getCardColor());
textItem.setTextColor(settings.getFontColor()); textItem.setTextColor(settings.getFontColor());
textItem.setTypeface(settings.getTypeFace()); textItem.setTypeface(settings.getTypeFace());

View File

@ -71,6 +71,7 @@ public class GlobalSettings {
private static final String IMAGE_LOAD = "image_load"; private static final String IMAGE_LOAD = "image_load";
private static final String IMAGE_QUALITY = "image_hq"; private static final String IMAGE_QUALITY = "image_hq";
private static final String ANSWER_LOAD = "answer_load"; private static final String ANSWER_LOAD = "answer_load";
private static final String PROFILE_OVERLAP = "profile_toolbar_overlap";
private static final String LOGGED_IN = "login"; private static final String LOGGED_IN = "login";
private static final String AUTH_KEY1 = "key1"; private static final String AUTH_KEY1 = "key1";
private static final String AUTH_KEY2 = "key2"; private static final String AUTH_KEY2 = "key2";
@ -116,7 +117,8 @@ public class GlobalSettings {
private boolean loggedIn; private boolean loggedIn;
private boolean isProxyEnabled; private boolean isProxyEnabled;
private boolean isProxyAuthSet; private boolean isProxyAuthSet;
private boolean isCustomAPIkeySet; private boolean customAPIKey;
private boolean toolbarOverlap;
private int indexFont; private int indexFont;
private int background_color; private int background_color;
private int font_color; private int font_color;
@ -310,6 +312,28 @@ public class GlobalSettings {
edit.apply(); edit.apply();
} }
/**
* is profile toolbar overlap enabled
*
* @return true if enabled
*/
public boolean getToolbarOverlap() {
return toolbarOverlap;
}
/**
* set profile toolbar overlap
*
* @param enable true if toolbar should overlap profile banner
*/
public void setToolbarOverlap(boolean enable) {
toolbarOverlap = enable;
Editor edit = settings.edit();
edit.putBoolean(PROFILE_OVERLAP, enable);
edit.apply();
}
/** /**
* sets image quality * sets image quality
* *
@ -670,7 +694,7 @@ public class GlobalSettings {
* @param key2 consumer key secret * @param key2 consumer key secret
*/ */
public void setCustomAPI(String key1, String key2) { public void setCustomAPI(String key1, String key2) {
isCustomAPIkeySet = true; customAPIKey = true;
this.api_key1 = key1; this.api_key1 = key1;
this.api_key2 = key2; this.api_key2 = key2;
@ -685,7 +709,7 @@ public class GlobalSettings {
* remove all API keys * remove all API keys
*/ */
public void removeCustomAPI() { public void removeCustomAPI() {
isCustomAPIkeySet = false; customAPIKey = false;
this.api_key1 = ""; this.api_key1 = "";
this.api_key2 = ""; this.api_key2 = "";
@ -702,7 +726,7 @@ public class GlobalSettings {
* @return true if custom API keys are set * @return true if custom API keys are set
*/ */
public boolean isCustomApiSet() { public boolean isCustomApiSet() {
return isCustomAPIkeySet; return customAPIKey;
} }
/** /**
@ -725,22 +749,23 @@ public class GlobalSettings {
icon_color = settings.getInt(ICON_COLOR, DEFAULT_ICON_COLOR); icon_color = settings.getInt(ICON_COLOR, DEFAULT_ICON_COLOR);
indexFont = settings.getInt(INDEX_FONT, DEFAULT_FONT_INDEX); indexFont = settings.getInt(INDEX_FONT, DEFAULT_FONT_INDEX);
listSize = settings.getInt(LIST_SIZE, DEFAULT_LIST_SIZE); listSize = settings.getInt(LIST_SIZE, DEFAULT_LIST_SIZE);
isProxyEnabled = settings.getBoolean(PROXY_SET, false);
isProxyAuthSet = settings.getBoolean(AUTH_SET, false);
loggedIn = settings.getBoolean(LOGGED_IN, false);
loadImage = settings.getBoolean(IMAGE_LOAD, true); loadImage = settings.getBoolean(IMAGE_LOAD, true);
loadAnswer = settings.getBoolean(ANSWER_LOAD, false); loadAnswer = settings.getBoolean(ANSWER_LOAD, false);
hqImages = settings.getBoolean(IMAGE_QUALITY, false); hqImages = settings.getBoolean(IMAGE_QUALITY, false);
loggedIn = settings.getBoolean(LOGGED_IN, false); toolbarOverlap = settings.getBoolean(PROFILE_OVERLAP, true);
isCustomAPIkeySet = settings.getBoolean(CUSTOM_CONSUMER_KEY_SET, false); customAPIKey = settings.getBoolean(CUSTOM_CONSUMER_KEY_SET, false);
api_key1 = settings.getString(CUSTOM_CONSUMER_KEY_1, ""); api_key1 = settings.getString(CUSTOM_CONSUMER_KEY_1, "");
api_key2 = settings.getString(CUSTOM_CONSUMER_KEY_2, ""); api_key2 = settings.getString(CUSTOM_CONSUMER_KEY_2, "");
auth_key1 = settings.getString(AUTH_KEY1, ""); auth_key1 = settings.getString(AUTH_KEY1, "");
auth_key2 = settings.getString(AUTH_KEY2, ""); auth_key2 = settings.getString(AUTH_KEY2, "");
userId = settings.getLong(USER_ID, 0);
isProxyEnabled = settings.getBoolean(PROXY_SET, false);
isProxyAuthSet = settings.getBoolean(AUTH_SET, false);
proxyHost = settings.getString(PROXY_ADDR, ""); proxyHost = settings.getString(PROXY_ADDR, "");
proxyPort = settings.getString(PROXY_PORT, ""); proxyPort = settings.getString(PROXY_PORT, "");
proxyUser = settings.getString(PROXY_USER, ""); proxyUser = settings.getString(PROXY_USER, "");
proxyPass = settings.getString(PROXY_PASS, ""); proxyPass = settings.getString(PROXY_PASS, "");
userId = settings.getLong(USER_ID, 0);
String place = settings.getString(TREND_LOC, DEFAULT_LOCATION_NAME); String place = settings.getString(TREND_LOC, DEFAULT_LOCATION_NAME);
int woeId = settings.getInt(TREND_ID, DEFAULT_LOCATION_WOEID); int woeId = settings.getInt(TREND_ID, DEFAULT_LOCATION_WOEID);
location = new TrendLocation(place, woeId); location = new TrendLocation(place, woeId);

View File

@ -7,6 +7,8 @@
android:id="@+id/dropdown_textitem" android:id="@+id/dropdown_textitem"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/dropdown_padding" /> android:textSize="@dimen/dropdown_text_size"
android:padding="@dimen/dropdown_padding"
android:maxLines="2" />
</LinearLayout> </LinearLayout>

View File

@ -7,7 +7,7 @@
android:orientation="vertical"> android:orientation="vertical">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/profile_toolbar" android:id="@+id/home_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/mainpage_toolbar_height" /> android:layout_height="@dimen/mainpage_toolbar_height" />

View File

@ -18,6 +18,7 @@
app:layout_scrollFlags="scroll|exitUntilCollapsed"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/profile_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">

View File

@ -187,20 +187,61 @@
android:padding="@dimen/settings_layout_padding"> android:padding="@dimen/settings_layout_padding">
<TextView <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/settings_look"
android:textSize="@dimen/settings_textsize" />
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/settins_font" android:layout_marginBottom="@dimen/settings_column_margin"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:singleLine="true" android:singleLine="true"
android:textSize="@dimen/settings_textsize" /> android:text="@string/settins_font"
android:textSize="@dimen/settings_textsize_small" />
<Spinner <Spinner
android:id="@+id/spinner_font" android:id="@+id/spinner_font"
android:layout_width="@dimen/settings_spinner_font_width" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/settings_spinner_margin"
android:layout_marginLeft="@dimen/settings_spinner_margin"
android:layout_weight="1"
android:popupBackground="@android:color/transparent" /> android:popupBackground="@android:color/transparent" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<com.kyleduo.switchbutton.SwitchButton
android:id="@+id/settings_toolbar_ov"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:singleLine="true"
android:text="@string/settings_enable_toolbar_overlap"
android:textSize="@dimen/settings_textsize_small" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
@ -217,13 +258,15 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/data_consumption" android:layout_marginBottom="@dimen/settings_column_margin"
android:singleLine="true" android:singleLine="true"
android:text="@string/data_consumption"
android:textSize="@dimen/settings_textsize" /> android:textSize="@dimen/settings_textsize" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@ -231,7 +274,8 @@
android:id="@+id/toggleImg" android:id="@+id/toggleImg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/settings_switch_margin" /> android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
@ -245,7 +289,10 @@
android:id="@+id/settings_image_hq" android:id="@+id/settings_image_hq"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/settings_switch_margin" /> android:layout_marginStart="@dimen/settings_switch_margin"
android:layout_marginLeft="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
@ -260,6 +307,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@ -267,14 +315,14 @@
android:id="@+id/toggleAns" android:id="@+id/toggleAns"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/settings_switch_margin" /> android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/settings_enable_ans_load"
android:singleLine="true" android:singleLine="true"
android:text="@string/settings_enable_ans_load"
android:textSize="@dimen/settings_textsize_small" /> android:textSize="@dimen/settings_textsize_small" />
</LinearLayout> </LinearLayout>
@ -406,13 +454,15 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/settings_connections" android:layout_marginBottom="@dimen/settings_column_margin"
android:singleLine="true" android:singleLine="true"
android:text="@string/settings_connections"
android:textSize="@dimen/settings_textsize" /> android:textSize="@dimen/settings_textsize" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@ -420,7 +470,8 @@
android:id="@+id/settings_enable_proxy" android:id="@+id/settings_enable_proxy"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/settings_switch_margin" /> android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -435,6 +486,7 @@
android:id="@+id/settings_layout_proxy" android:id="@+id/settings_layout_proxy"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:orientation="horizontal"> android:orientation="horizontal">
<EditText <EditText
@ -468,6 +520,7 @@
android:id="@+id/settings_layout_auth_enable" android:id="@+id/settings_layout_auth_enable"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@ -475,7 +528,8 @@
android:id="@+id/settings_enable_auth" android:id="@+id/settings_enable_auth"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/settings_switch_margin" /> android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -490,6 +544,7 @@
android:id="@+id/settings_layout_proxy_auth" android:id="@+id/settings_layout_proxy_auth"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:orientation="horizontal"> android:orientation="horizontal">
<EditText <EditText
@ -519,6 +574,7 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@ -526,7 +582,8 @@
android:id="@+id/settings_set_custom_keys" android:id="@+id/settings_set_custom_keys"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/settings_switch_margin" /> android:layout_marginEnd="@dimen/settings_switch_margin"
android:layout_marginRight="@dimen/settings_switch_margin" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -194,4 +194,6 @@
<string name="button_play_pause">Pause/Abspielen</string> <string name="button_play_pause">Pause/Abspielen</string>
<string name="button_share">Videolink teilen</string> <string name="button_share">Videolink teilen</string>
<string name="info_cant_add_gif">GIF konnte nicht hinzugefügt werden!</string> <string name="info_cant_add_gif">GIF konnte nicht hinzugefügt werden!</string>
<string name="settings_look">Aussehen</string>
<string name="settings_enable_toolbar_overlap">Überlappe Profilbanner</string>
</resources> </resources>

View File

@ -16,8 +16,9 @@
<dimen name="settings_button_height">30sp</dimen> <dimen name="settings_button_height">30sp</dimen>
<dimen name="settings_button_color_edge_thickness">1dp</dimen> <dimen name="settings_button_color_edge_thickness">1dp</dimen>
<dimen name="settings_button_margin">5dp</dimen> <dimen name="settings_button_margin">5dp</dimen>
<dimen name="settings_switch_margin">5dp</dimen> <dimen name="settings_switch_margin">10dp</dimen>
<dimen name="settings_spinner_font_width">250sp</dimen> <dimen name="settings_spinner_margin">10dp</dimen>
<dimen name="settings_column_margin">5dp</dimen>
<dimen name="settings_seek_number_width">30sp</dimen> <dimen name="settings_seek_number_width">30sp</dimen>
<dimen name="settings_seek_margin">10dp</dimen> <dimen name="settings_seek_margin">10dp</dimen>
@ -147,6 +148,7 @@
<!-- dimens of item_dropdown--> <!-- dimens of item_dropdown-->
<dimen name="dropdown_padding">2dp</dimen> <dimen name="dropdown_padding">2dp</dimen>
<dimen name="dropdown_text_size">18sp</dimen>
<!--dimens of page_media.xml--> <!--dimens of page_media.xml-->
<dimen name="mediapage_preview_margin">10dp</dimen> <dimen name="mediapage_preview_margin">10dp</dimen>

View File

@ -212,4 +212,6 @@
<string name="dialog_button_no">No</string> <string name="dialog_button_no">No</string>
<string name="dialog_button_cancel">Cancel</string> <string name="dialog_button_cancel">Cancel</string>
<string name="dialog_button_ok">OK</string> <string name="dialog_button_ok">OK</string>
<string name="settings_enable_toolbar_overlap">overlap profile banner</string>
<string name="settings_look">Look</string>
</resources> </resources>