diff --git a/main/java/com/google/android/setupcompat/template/FooterBarMixin.java b/main/java/com/google/android/setupcompat/template/FooterBarMixin.java
index 4d78955..4d2a0c9 100644
--- a/main/java/com/google/android/setupcompat/template/FooterBarMixin.java
+++ b/main/java/com/google/android/setupcompat/template/FooterBarMixin.java
@@ -33,6 +33,7 @@
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.ViewStub;
 import android.widget.Button;
 import android.widget.LinearLayout;
@@ -536,13 +537,12 @@
       buttonContainer.addView(tempPrimaryButton);
     }
 
-    if (isEvenlyWeightedButtons) {
-      setEvenlyWeightedButtons(tempPrimaryButton, tempSecondaryButton);
-    }
+    setEvenlyWeightedButtons(tempPrimaryButton, tempSecondaryButton, isEvenlyWeightedButtons);
   }
 
-  private void setEvenlyWeightedButtons(Button primaryButton, Button secondaryButton) {
-    if (primaryButton != null && secondaryButton != null) {
+  private void setEvenlyWeightedButtons(
+      Button primaryButton, Button secondaryButton, boolean isEvenlyWeighted) {
+    if (primaryButton != null && secondaryButton != null && isEvenlyWeighted) {
       primaryButton.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
       int primaryButtonMeasuredWidth = primaryButton.getMeasuredWidth();
       secondaryButton.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
@@ -552,6 +552,25 @@
 
       primaryButton.getLayoutParams().width = maxButtonMeasureWidth;
       secondaryButton.getLayoutParams().width = maxButtonMeasureWidth;
+    } else {
+      if (primaryButton != null) {
+        LinearLayout.LayoutParams primaryLayoutParams =
+            (LinearLayout.LayoutParams) primaryButton.getLayoutParams();
+        if (null != primaryLayoutParams) {
+          primaryLayoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT;
+          primaryLayoutParams.weight = 0;
+          primaryButton.setLayoutParams(primaryLayoutParams);
+        }
+      }
+      if (secondaryButton != null) {
+        LinearLayout.LayoutParams secondaryLayoutParams =
+            (LinearLayout.LayoutParams) secondaryButton.getLayoutParams();
+        if (null != secondaryLayoutParams) {
+          secondaryLayoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT;
+          secondaryLayoutParams.weight = 0;
+          secondaryButton.setLayoutParams(secondaryLayoutParams);
+        }
+      }
     }
   }
 
diff --git a/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java b/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
index 8fa862f..3c4e2a2 100644
--- a/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
+++ b/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
@@ -72,8 +72,8 @@
    * @return Whether the current OS version is higher or equal to T.
    */
   public static boolean isAtLeastT() {
-    if (!isAtLeastS()) {
-      return false;
+    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+      return true;
     }
     return (Build.VERSION.CODENAME.equals("REL") && Build.VERSION.SDK_INT >= 33)
         || (Build.VERSION.CODENAME.length() == 1
