remove some bad weightsum stuff for landscape layout
properly set feed title on tablets if needed
This commit is contained in:
parent
8d886c41ce
commit
424970d191
@ -1,7 +1,6 @@
|
||||
package org.fox.ttrss;
|
||||
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
@ -16,7 +15,6 @@ import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
|
||||
@ -59,8 +57,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
setContentView(R.layout.headlines);
|
||||
|
||||
setStatusBarTint();
|
||||
setSmallScreen(findViewById(R.id.sw600dp_anchor) == null &&
|
||||
findViewById(R.id.sw600dp_port_anchor) == null);
|
||||
setSmallScreen(findViewById(R.id.sw600dp_anchor) == null);
|
||||
|
||||
GlobalState.getInstance().load(savedInstanceState);
|
||||
|
||||
@ -161,23 +158,10 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
m_drawerLayout.openDrawer(Gravity.START);
|
||||
}
|
||||
|
||||
if (!isSmallScreen()) {
|
||||
// temporary hack because FeedsActivity doesn't track whether active feed is open
|
||||
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
||||
|
||||
if (container != null)
|
||||
container.setWeightSum(3f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* if (!isCompatMode() && !isSmallScreen()) {
|
||||
((ViewGroup)findViewById(R.id.headlines_fragment)).setLayoutTransition(new LayoutTransition());
|
||||
((ViewGroup)findViewById(R.id.feeds_fragment)).setLayoutTransition(new LayoutTransition());
|
||||
} */
|
||||
|
||||
}
|
||||
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
// Sync the toggle state after onRestoreInstanceState has occurred.
|
||||
@ -227,18 +211,6 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
ft.replace(R.id.headlines_fragment, new LoadingFragment(), null);
|
||||
ft.commit();
|
||||
|
||||
if (!isCompatMode() && !isSmallScreen()) {
|
||||
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
||||
if (container != null) {
|
||||
float wSum = container.getWeightSum();
|
||||
if (wSum <= 2.0f) {
|
||||
ObjectAnimator anim = ObjectAnimator.ofFloat(container, "weightSum", wSum, 3.0f);
|
||||
anim.setDuration(200);
|
||||
anim.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final Feed fFeed = feed;
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
|
@ -15,7 +15,6 @@ import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import org.fox.ttrss.GlobalState;
|
||||
import org.fox.ttrss.R;
|
||||
@ -44,8 +43,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
||||
setContentView(R.layout.headlines);
|
||||
|
||||
setStatusBarTint();
|
||||
setSmallScreen(findViewById(R.id.sw600dp_anchor) == null &&
|
||||
findViewById(R.id.sw600dp_port_anchor) == null);
|
||||
setSmallScreen(findViewById(R.id.sw600dp_anchor) == null);
|
||||
|
||||
GlobalState.getInstance().load(savedInstanceState);
|
||||
|
||||
@ -254,12 +252,6 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
||||
public void onFeedSelected(final int feedId, final boolean isCat, boolean open) {
|
||||
|
||||
if (open) {
|
||||
if (!isSmallScreen()) {
|
||||
LinearLayout container = (LinearLayout) findViewById(R.id.fragment_container);
|
||||
if (container != null) {
|
||||
container.setWeightSum(3f);
|
||||
}
|
||||
}
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
|
@ -18,7 +18,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
android:weightSum="1.1"
|
||||
android:weightSum="3"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<FrameLayout
|
||||
|
@ -1,41 +0,0 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/sw600dp_anchor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" >
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
android:weightSum="1.1"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/feeds_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?feedlistBackground" >
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/headlines_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:background="?headlinesBackground" >
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user