我想仰视图添加到Coordinator与布局view pager的话,底部视图将在顶部fragment的加载view pager和独立的吧.
我加了一个linear layout用
layout_gravity = "bottom"
Run Code Online (Sandbox Code Playgroud)
但底视图linear layout根本没有显示
以下是我的xml布局activity.
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/maintoolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<android.support.design.widget.TabLayout
android:id="@+id/maintabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/mainviewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<LinearLayout
android:id="@+id/completeBottomView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ProgressBar
android:id="@+id/progressBarBottomView"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="5dp"
android:indeterminate="false"
android:visibility="gone"
android:max="100"
android:progress="1"/>
<HorizontalScrollView
android:id="@+id/limiter_scroller"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:background="#FF3399"
>
<LinearLayout …Run Code Online (Sandbox Code Playgroud) android android-layout android-linearlayout android-coordinatorlayout
我有一个活动,我正在使用前置摄像头录制视频.一切都运转正常,唯一的问题是当我开始录制视频时相机预览会变得非常暗.
在按下开始按钮(录制视频)之前 -
按下开始按钮后 -
我没有在这里发布代码,因为我只想先了解这背后的原因.这是因为我不知道的任何相机属性?.
请帮忙 .提前致谢
我的应用程序中有一个功能,用户可以在运行时从应用程序内部选择各种语言,它运行良好,直到我以 APK 格式在 Play 商店上部署应用程序,但自从我开始以App Bundle 格式部署我的应用程序后它停止工作。默认字符串资源不会被用户选择的资源替换,但是当我从设备的设置选项更改整个设备语言时,我的应用程序将使用来自 Play 商店的新配置资源进行更新,并且一切正常。有什么方法可以强制所有字符串资源与基本 apk 或我不知道的任何其他方式一起推送?请帮忙。我用来更改语言的代码是 -
Locale locale = new Locale(langCode); //langCode is the code of the language user has selected
Locale.setDefault(locale);
Resources res = parentContext.getResources();
Configuration config = res.getConfiguration();
config.setLocale(locale); // = locale;
res.updateConfiguration(config, parentContext.getResources().getDisplayMetrics());
Run Code Online (Sandbox Code Playgroud)