基本上我喜欢Jonathan Lee先生在谷歌官方链接http://www.google.com/design/spec/patterns/navigation-drawer.html#navigation-drawer-content中使用导航抽屉头部背景所使用的背景
所以我想要重现类似的东西.我相信我需要在photoshop中制作类似的设计并将其设置为背景图像.但问题是,尺寸和像素应该是多少才能匹配不同类型的设备?
上面的链接有图标和边距的指南,但我没有看到为该背景提到的任何尺寸.
有没有人有任何想法或链接可以帮助?
我一直在寻找一个如何在我的应用程序中实现配置文件图片更改的示例.我想允许人们使用Parse.com添加/更改他们的个人资料图片(类似于今天的所有社交媒体应用程序).
例如: Twitter,Facebook,Instagram等,它们都允许您拍摄/上传个人资料图像,并保存该图像,以后可以查看.
我没有找到任何材料来解决如何做这样的事情,似乎没有其他人理解我在这里想要实现的目标:
到目前为止,在我的应用程序中,用户可以使用相机意图拍摄照片或从图库上传图像,该图像将在图像视图中完美显示.
问题是:当我退出并重新打开应用程序时,图像视图内的图像不再显示(它已消失).
我怎么解决这个问题?
主要活动:
public class MainActivity extends AppCompatActivity {
public static final int TAKE_PIC_REQUEST_CODE = 0;
public static final int CHOOSE_PIC_REQUEST_CODE = 1;
public static final int MEDIA_TYPE_IMAGE = 2;
private Uri mMediaUri;
private TextView mChangeProfilePic;
protected ImageView mPreviewImageView;
private Button mSaveChangesBtn;
public ImageView mProfilePic;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) { …
Run Code Online (Sandbox Code Playgroud) android image android-camera android-activity parse-platform
我已经阅读了有关Firebase Cloud Firestore使用价格的信息,并且在下面的第一个屏幕截图中显示:
每天都会应用配额,并会在太平洋时间午夜左右重置。
在第二个屏幕截图中,它显示:
超出免费套餐的使用和存储配额后,您需要为执行的数据库操作付费
我的关注:
假设我使用Firebase的Cloud Firestore构建了一个应用,但有时该应用超出了免费配额:
要么
由于我使用的是免费套餐配额,并且尚未注册计费,因此我将只能与后端进行通信,直到我停止超过免费配额限制为止?
只要我确保停止超过免费配额限制,免费配额还会在午夜重置吗?
本质上,我从来没有注册过计费帐户,我一直都有免费的Firebase帐户,那么当免费帐户用户超过Cloud Firestore提供的免费配额时,会发生什么情况呢?
1st屏幕截图:
第二截图:
另外:
使用Cloud Firestore构建社交媒体应用程序(后端有大量读写操作)是否更可行(例如,当用户在应用程序中发布帖子时),还是应该使用经典的实时Firebase数据库?(在定价方面)
最后:
在Firebase上,用户可以使用App Engine监控配额。我要担心的是,为了使用此功能,我是否必须使用付费帐单帐户?免费帐户用户是否可以使用应用程序引擎监控其配额?
google-app-engine android firebase firebase-realtime-database google-cloud-firestore
我在我的Windows PC上创建了一个应用程序,然后通过该PC将应用程序发布到Google Play商店.我已将所有项目从我的PC迁移(通过外置硬盘传输)到我的Mac.
我现在想知道在Mac上编译相同的应用程序会导致它创建新证书吗?
我想知道的原因是因为我想要发布更新,并且更愿意在Mac上处理项目,但我不想发生问题,当我决定从Mac发布应用程序时播放商店将看到不同的证书,该应用程序将被发布,就好像它是一个全新的APK.
我希望能够清楚准确地理解两者之间的区别.
this
用于隐式引用还是显式的关键字也是?这也是我想要在两者之间澄清的原因?
我假设使用this
关键字is隐式引用(是类的东西)而显式(不属于类本身)就像传递给方法的参数变量一样.
当然,我的假设显然是错误的,这就是我在这里要求澄清的原因.
我有一个片段,其中包含一个位于我的布局滚动视图内的地图(视图).
问题是地图无法向上或向下滚动(难以滚动).滚动视图似乎干扰了地图的垂直滚动.它水平滚动(平滑)而不是垂直滚动.
我怎样才能解决这个问题?
我的XML布局:
<ScrollView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageViewContactEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_marginTop="250dp"
android:contentDescription="@string/contactEmailIcon"
android:src="@drawable/ic_action_contactemail" />
<TextView
android:id="@+id/textViewContactEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/imageViewContactEmail"
android:layout_alignRight="@+id/imageViewContactEmail"
android:layout_marginEnd="-50dp"
android:layout_marginRight="-50dp"
android:layout_marginTop="255dp"
android:text="@string/contactEmail"
android:textColor="#bdbdbd" />
<TextView
android:id="@+id/textViewContactEmailLink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="61dp"
android:layout_marginStart="61dp"
android:layout_marginTop="275dp"
android:text="@string/emailNDTC"
android:textColor="#2196F3" />
<ImageView
android:id="@+id/imageViewContactLine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textViewContactEmailLink"
android:layout_marginTop="20dp"
android:contentDescription="@string/contactLine"
android:src="@drawable/line" />
<ImageView
android:id="@+id/imageViewContactPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageViewContactLine"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:contentDescription="@string/contactPhoneIcon"
android:src="@drawable/ic_action_contactphone" />
<TextView
android:id="@+id/textViewContactPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/imageViewContactEmail"
android:layout_alignRight="@+id/imageViewContactEmail"
android:layout_below="@+id/imageViewContactLine"
android:layout_marginEnd="-50dp"
android:layout_marginRight="-50dp"
android:layout_marginTop="22dp"
android:text="@string/contactPhone"
android:textColor="#bdbdbd" />
<TextView
android:id="@+id/textViewContactPhoneLink"
android:layout_width="wrap_content"
android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud) 场景:
我正在构建一个允许用户使用他们的Google帐户登录的应用,值得注意的是,这是使用Firebase身份验证完成的.
问题:
用户完美地登录,但每当我得到他们的个人资料图片时,它都会很好地返回,但它非常模糊.
我研究并发现一些网站提到改变谷歌个人资料图片的分辨率,但我不确定这是否可行.我知道Facebook有一个图表,允许你操纵配置文件图像的URL来改变分辨率,但我不知道如何通过谷歌提高配置文件图像的分辨率.
我发布了下面模糊图片的截图:
这是我正在加载配置文件图像的ImageView的XML代码:
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/image_view_profile_pic"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="36dp"
android:src="@drawable/app_bar_tool_bar_bg"
app:civ_border_width="2dp"
app:civ_border_color="#FFFFFFFF"
android:contentDescription="@string/content_description_profile_picture" />
Run Code Online (Sandbox Code Playgroud)
这是我用来通过Firebase从Google获取个人资料图片的代码:
private void getUserProfileContent() {
// Check if the user is signed in
if (mUser != null) {
for (UserInfo profile : mUser.getProviderData()) {
// Profile photo url
Uri photoUrl = profile.getPhotoUrl();
// Load user's profile photo from their signed-in provider into the image view
Glide.with(ProfileActivity.this)
.load(photoUrl)
.into(mProfilePic);
}
}
}
Run Code Online (Sandbox Code Playgroud)
这是获取当前经过身份验证的用户的代码:
// Variable declaration
private FirebaseUser mUser;
// Initializatioin in …
Run Code Online (Sandbox Code Playgroud) android uri google-authentication firebase firebase-authentication
android ×7
firebase ×2
apk ×1
explicit ×1
google-maps ×1
google-play ×1
graphics ×1
image ×1
java ×1
scrollview ×1
uri ×1