小编mic*_*sol的帖子

UWP - 使用翻转视图缩放图像(使用捏缩放和双击)

我需要显示图像(使用翻转视图控件)并允许用户缩放它们(使用捏缩放和双击)并拖动缩放图像.

我希望它与Flip View兼容(我的意思是它不应该使用拖动手势).

实现这一目标的最佳方法是什么?

c# xaml image flipview uwp

8
推荐指数
1
解决办法
5228
查看次数

UWP,XAML - 使CheckBox为空

如何让CheckBox为空?我只需要打勾.现在它需要额外的空白空间,就像这里:

我不想要那个空的水色空间

<CheckBox
Background="Aqua"
Margin="0,0,0,0"/>
Run Code Online (Sandbox Code Playgroud)

(我添加了颜色以查看此控件占用多少空间(空白空间导致所有问题)).

我只需要刻度矩形,我不想要空的空间.我怎样才能做到这一点?

将边距设置为零并将内容设置为""不起作用.

c# checkbox xaml win-universal-app uwp

8
推荐指数
1
解决办法
1199
查看次数

在ViewPager中将大位图加载到ImageView - 内存不足

我有ViewPager用于显示可缩放的图像(使用ImageViewTouch).我需要从Internet(http)加载大型位图.我的意思是2000x1000.图像需要如此之大,因为它们是可缩放的,需要显示细节.服务器上的图像是.jpg格式,但不是问题 - 我可以更改它.

如何设置将如此大的图像加载到ImageViewTouch(ImageView)而不会获得带内存的问题?

到现在为止我只使用这个(AsyncTask):

    ImageView currentView; //ImageView where to place image loaded from Internet
    String ImageUrl; //URL of image to load

    protected Bitmap doInBackground(ArrayList... params) {

            Bitmap bitmap;
            InputStream in = null;
            imageUrl = (String)params[0].get(1);

            try{
                HttpClient httpclient = new DefaultHttpClient();
                HttpResponse response = httpclient.execute(new HttpGet(imageUrl));
                in = response.getEntity().getContent();
            } catch(Exception e){
                e.printStackTrace();
            }
            try {
                bitmapa = BitmapFactory.decodeStream(in);
                in.close();
            } catch (IOException e1) {
                e1.printStackTrace();
            }

            return bitmap;
        }


        @Override
        protected void onPostExecute(Bitmap bitmap) {

            currentView.setImageBitmap(bitmap); …
Run Code Online (Sandbox Code Playgroud)

android bitmap out-of-memory imageview bitmapfactory

6
推荐指数
1
解决办法
5036
查看次数

使用NavigationView的DrawerLayout - 未在点击上显示涟漪效应

我在抽屉上看到可以看到点击效果的问题.

我有活动xml布局如下:

    <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_layout"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/activity_main_drawer"/>

</android.support.v4.widget.DrawerLayout>
Run Code Online (Sandbox Code Playgroud)

你可以看到我放入NavigationView我的DrawerLayout然后NavigationView使用菜单xml文件填充.

activity_main_drawer.xml看起来如下:

<menu
xmlns:android="http://schemas.android.com/apk/res/android"
>
<group>
    <item
        android:id="@+id/id1"
        android:title="Item 1"/>
    <item
        android:id="@+id/id2"
        android:title="Item 2"/>
    <item
        android:id="@+id/id3"
        android:title="Item 3"/>
    <item
        android:id="@+id/id4"
        android:title="Item 4"/>
</group>
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我这样做时,我点击该抽屉菜单中的项目后没有任何视觉效果.我想要的是所谓的"涟漪效应".我该怎么做?

android navigation-drawer drawerlayout navigationview android-navigationview

6
推荐指数
1
解决办法
909
查看次数

Firebase 托管 - 如何获取当前 json

我正在使用带有动态链接的 Firebase 托管(我使用自己的域,如https://firebase.google.com/docs/dynamic-links/custom-domains#manual中所述)。

文档说

注意:您可以使用托管 REST API 检查部署的 firebase.json 内容。

但是,我无法以任何方式看到部署的 firebase.json 文件。我尝试过使用 REST API,我一直在 Google Cloud 中查找这些文件,但没有成功。有什么建议么?

firebase firebase-hosting firebase-dynamic-links

5
推荐指数
1
解决办法
602
查看次数