优化天气控件位置
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
|||||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||||
<groovy codeStyle="LEGACY" />
|
<groovy codeStyle="LEGACY" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -14,6 +14,7 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintSet;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.mogo.commons.AbsMogoApplication;
|
import com.mogo.commons.AbsMogoApplication;
|
||||||
@@ -315,9 +316,25 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|||||||
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
|
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
|
||||||
mStatusManager);
|
mStatusManager);
|
||||||
|
|
||||||
|
dealWeatherContainer();
|
||||||
|
|
||||||
debugTopView();
|
debugTopView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 由于Launcher和Independent对于天气的表现形式不太一样,所以通过此方法区分处理
|
||||||
|
*/
|
||||||
|
private void dealWeatherContainer(){
|
||||||
|
if (!DebugConfig.isLauncher()) {
|
||||||
|
ConstraintSet constraintSet = new ConstraintSet();
|
||||||
|
constraintSet.clone((ConstraintLayout) getView());
|
||||||
|
constraintSet.clear(R.id.module_ext_id_weather_container,ConstraintSet.START);
|
||||||
|
constraintSet.connect(R.id.module_ext_id_weather_container, ConstraintSet.END,
|
||||||
|
getView().getId(), ConstraintSet.END);
|
||||||
|
constraintSet.applyTo((ConstraintLayout) getView());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void showShareDialog() {
|
public void showShareDialog() {
|
||||||
isClickShare = true;
|
isClickShare = true;
|
||||||
mApis.getShareManager().showShareDialog();
|
mApis.getShareManager().showShareDialog();
|
||||||
@@ -600,15 +617,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|||||||
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功"));
|
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功"));
|
||||||
|
|
||||||
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v->{
|
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v->{
|
||||||
TipDrawable drawable =
|
mMsgContainer.setVisibility(View.VISIBLE);
|
||||||
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head), 150, 150);
|
// TipDrawable drawable =
|
||||||
TipToast.tip("分享成功",drawable);
|
// new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head), 150, 150);
|
||||||
|
// TipToast.tip("分享成功",drawable);
|
||||||
});
|
});
|
||||||
|
|
||||||
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v->{
|
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v->{
|
||||||
TipDrawable drawable =
|
mMsgContainer.setVisibility(View.GONE);
|
||||||
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
|
// TipDrawable drawable =
|
||||||
TipToast.tip("分享成功",drawable);
|
// new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
|
||||||
|
// TipToast.tip("分享成功",drawable);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
android:id="@+id/groupTopViewDebug"
|
android:id="@+id/groupTopViewDebug"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
android:visibility="visible"
|
||||||
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
|
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -8,15 +8,15 @@
|
|||||||
android:id="@+id/module_ext_id_weather_container"
|
android:id="@+id/module_ext_id_weather_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/module_ext_height"
|
android:layout_height="@dimen/module_ext_height"
|
||||||
android:layout_marginEnd="@dimen/module_ext_weather_margin_end"
|
|
||||||
app:layout_goneMarginEnd="0dp"
|
|
||||||
android:background="@drawable/module_ext_drawable_weather_bkg"
|
android:background="@drawable/module_ext_drawable_weather_bkg"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingStart="@dimen/module_ext_weather_container_paddingLeft"
|
android:paddingStart="@dimen/module_ext_weather_container_paddingLeft"
|
||||||
android:paddingEnd="@dimen/module_ext_weather_container_paddingRight"
|
android:paddingEnd="@dimen/module_ext_weather_container_paddingRight"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintRight_toLeftOf="@+id/ivUserHeadImg"
|
app:layout_goneMarginLeft="@dimen/module_ext_notice_margin_start"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintLeft_toRightOf="@+id/module_ext_id_msg"
|
||||||
|
android:layout_marginStart="@dimen/module_ext_weather_margin_start"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -75,5 +75,5 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="@+id/module_ext_id_weather_container"
|
app:layout_constraintBottom_toBottomOf="@+id/module_ext_id_weather_container"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/module_ext_id_weather_container"
|
app:layout_constraintTop_toTopOf="@+id/module_ext_id_weather_container"
|
||||||
tools:visibility="visible" />
|
tools:visibility="gone" />
|
||||||
</merge>
|
</merge>
|
||||||
@@ -145,5 +145,5 @@
|
|||||||
|
|
||||||
<dimen name="module_ext_top_over_navi_height">34px</dimen>
|
<dimen name="module_ext_top_over_navi_height">34px</dimen>
|
||||||
<dimen name="module_ext_notice_margin_start">175px</dimen>
|
<dimen name="module_ext_notice_margin_start">175px</dimen>
|
||||||
<dimen name="module_ext_weather_margin_end">485px</dimen>
|
<dimen name="module_ext_weather_margin_start">30px</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -150,6 +150,6 @@
|
|||||||
<dimen name="module_ext_display_overview_icon_marginTop">10px</dimen>
|
<dimen name="module_ext_display_overview_icon_marginTop">10px</dimen>
|
||||||
|
|
||||||
<dimen name="module_ext_top_over_navi_height">19px</dimen>
|
<dimen name="module_ext_top_over_navi_height">19px</dimen>
|
||||||
|
<dimen name="module_ext_weather_margin_start">16px</dimen>
|
||||||
|
|
||||||
<dimen name="module_ext_weather_margin_end">231px</dimen>
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user