I want to do the following, I have an icon ActionBar
with the magnifying glass (I show it in the image) and when the magnifying glass is clicked I want it to change to the other view (second image) and that it can be written in the action bar
Nicolas Schmidt's questions
I wanted to know how to change the color of the progress of a circular ProgressBar (not the one that is a bar)
the code of my progress bar
android:id="@+id/pg_bar"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_gravity="center"
android:layout_marginTop="25dp"
I wanted to know how can I achieve a blur effect in android-studio . I don't do it with Photoshop or similar software because it's the user's profile and the profile photo is the one that blurs in the background.
For that reason it must be dynamic .
This is the example image.
It turns out that I did some things wrong in my Android Studio code and everything has been mixed up without being able to order it, in my repository I have a copy of the ordered code.
How do I get it to Android Studio? Because if I do a pull
it tells me that it is updated.
Thank you
I have an iphone 6s and I am developing an app in Android Studio. I wanted to know if there is any way to emulate the android application on the iphone with a virtualBox or something like that.
Thanks.
It turns out that in my activity splash, I have an image, that when the app is opened, it is shown as an animation, and it moves from the bottom to the top but then returns to the center of the screen. I can't get the image to stay on top of the screen. What is the property or what do I have to modify?
this is my translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0%"
android:toXDelta="0%"
android:fromYDelta="200%"
android:toYDelta="-90%"
android:duration="5000"
android:zAdjustment="top"
I have the following error when adding an ImageView. this is my imageview and the error
android:layout_width="130dp"
android:layout_height="130dp"
android:src="@drawable/mi_imagen_icon"
android:layout_centerHorizontal="true"
android:id="@+id/imageView"
android:layout_marginTop="-11dp"
the error
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.nicolas.miproyecto, PID: 8618
java.lang.OutOfMemoryError: Failed to allocate a 51301388 byte allocation with 4635664 free bytes and 4MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1080)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2635)
at android.content.res.Resources.loadDrawable(Resources.java:2540)
at android.content.res.TypedArray.getDrawable(TypedArray.java:870)
at android.widget.ImageView.<init>(ImageView.java:152)
at android.widget.ImageView.<init>(ImageView.java:140)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:57)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:53)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:972)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1031)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:746)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.example.nicolas.jobworks.MainActivity.onCreate(MainActivity.java:20)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I wanted to know how I can configure a background image, so that it can be seen on the entire screen, remove the ActionBar and I want to make the notification bar transparent so that the image can be seen there too. Thanks in advance.
Had treated:
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/background"/>
I wanted to know how to center a textview, since the title of the app is out of phase for me to the right and not in the center of the screen, thanks.
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/TituloApp"
android:text="HOLA'"
android:paddingLeft="50dp"
android:textSize="55dp"
android:layout_marginTop="30dp"
/>
I wanted to know how to remove the action bar from a single Layout, but in the others if it is. For example, on the login screen of the application that there is no Action bar, but once the session is started and the layout changes if the action bar appears
being new I am practicing in Android Studio, but I have a problem, I have created a button and I want to release a message when it is pressed, but it gives me the following error on a screen that I can only put OK and it does not stop coming out, I mean I click OK but it reappears. This is the error;
Cannot reload AVD list: cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\armeabi-v7a\devices.xml
cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\x86\devices.xml
cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\armeabi-v7a\devices.xml
cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\x86\devices.xml
THIS IS MY MAIN CLASS IN CASE OF DOUBTS THAT NEED IT
package schmidtnicolas.mixsdeideas;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
Button botonLogin;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
botonLogin = (Button) findViewById(R.id.button);
botonLogin.setOnClickListener(this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.button:
Toast.makeText(getApplicationContext(), "Emtrando..", Toast.LENGTH_SHORT).show();
}
}
}
Here is the structure of my button:
Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText2"
android:paddingTop="0dp"
android:background="@drawable/button_green"
android:layout_alignLeft="@+id/editText2"
android:layout_alignStart="@+id/editText2"
android:layout_alignRight="@+id/editText2"
android:layout_alignEnd="@+id/editText2"
android:layout_marginTop="54dp"
android:hint="Login"
android:textColorHint="#97ffffff"
android:textSize="20dp"
android:id="@+id/button"
I have a problem when I select API 23 6.0. It tells me the following error This version of the rendering library is more recent than your version of Android Studio. Please update Android Studio.
org.jetbrains.android.uipreview.RenderingException: This version of the rendering library is more recent than your version of Android Studio. Please update Android Studio
at org.jetbrains.android.uipreview.LayoutLibraryLoader.load(LayoutLibraryLoader.java:90)
at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:180)
at com.android.tools.idea.rendering.RenderService.createTask(RenderService.java:163)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:640)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:80)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:585)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:580)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I check for updates but my Android Studio tells me that it is up to date. if I select API 22 5.1.1 there is no problem.
I wanted to tell you about my problem since I'm a bit new to this and I still don't understand much about Android Studio. Every time I create a new project in Android Studio I get the following error, it doesn't matter where I save the project, I've already tried changing several destination folders but it doesn't work, this is the problem.
Error:C:\Users\NICOLAS\.gradle\caches\2.4\scripts\asLocalRepo41_6c5ymcule2hvs0zk7phnqe614\InitScript\initscript\cache.properties (The system cannot find the specified file)
Thank you very much.